COS-Blog

How do I add alt text to featured images on blog listing pages?

Last updated: November 23, 2016

Available For:

Product: HubSpot Marketing
Subscription: Basic, Professional, & Enterprise

At this time, a featured image's alt text is not available in post listings. This can cause SEO warnings on listing pages in Page Performance.

The easiest way to resolve this issue is to add an alt tag that automatically updates with the post's name. Follow these instructions:

  • Navigate to Content > Design Manager
  • Locate your blog template. Click the Edit Listing Template button within the Blog Content module to access the HTML of your listing template.

  • Add alt="{{ page_meta.name }}" to the featured image img tag.

<img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image" alt="{{ page_meta.name }}">
  • Click Publish Changes.