Dynamic alt text defaults to “Image placeholder” in Query Loop

  • Hello Support Team,

    I’m having an issue with image alt text in the Query Loop element on both blog and post pages. The alt tag for all images defaults to alt=”Image placeholder” instead of pulling the actual alt text set in the Media Library.

    This happens across the Home, Blog, and Single Post pages. I also checked your demo site (https://sites.generatepress.com/keynote/) and noticed the exact same issue there.

    Could you please look into this and let me know how to fix it?

    Why the Alt Text (ALT-Tag) is important for Google:

    Image Indexing & Context: Google Search crawlers cannot “see” images like humans do; alt text tells search engines what the image displays so it can be indexed correctly in Google Images.

    SEO & Keyword Relevance: It provides additional textual context to the page, helping Google better understand the overall content and rank the page for relevant search queries.

    Accessibility: It serves as alternative text for screen readers (used by visually impaired users), which aligns with Google’s Webmaster guidelines for user accessibility and site quality.

    Examples from https://sites.generatepress.com/keynote/. None of the Post articles is listed correctly, they are tagged with alt=”Image placeholder”:

    <a href="https://sites.generatepress.com/keynote"><img decoding="async" class="gb-media-e68dbc94" alt="Keynote logo" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/keynote-logo.svg" title="keynote-logo"/></a>
    <img fetchpriority="high" decoding="async" width="1000" height="667" class="gb-media-51a613c5" alt="keynote speaker" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/terren-hurst-blgOFmPIlr0-unsplash.jpg" title="terren-hurst-blgOFmPIlr0-unsplash" ....
    <img decoding="async" width="1000" height="667" class="gb-media-cb948226" alt="event audience" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/jorge-gordo-W2UH8LdD3Tc-unsplash.jpg" title="jorge-gordo-W2UH8LdD3Tc-unsplash"  ....
    <img decoding="async" width="1000" height="1000" class="gb-media-799ab728" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/linkedin-sales-solutions-nysVe5rsJtc-unsplash.jpg" alt="man working" title="linkedin-sales-solutions-nysVe5rsJtc-unsplash" ....
    <img loading="lazy" decoding="async" width="1000" height="1000" class="gb-media-d4a5fb60" alt="book" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/thought-catalog-Q7sGp9MStSY-unsplash.jpg" title="thought-catalog-Q7sGp9MStSY-unsplash"  ....
    <img loading="lazy" decoding="async" width="800" height="533" class="gb-media-a363d5cf" alt="Event center" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/clay-elliot-AU68limgAo8-unsplash.jpg" title="clay-elliot-AU68limgAo8-unsplash"  ....
    <img loading="lazy" decoding="async" width="1000" height="667" data-media-id="49447" class="gb-media-cb3884c6" alt="Image placeholder" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/dylan-gillis-KdeqA3aTnBY-unsplash-1.jpg"  ....
    <img loading="lazy" decoding="async" width="1000" height="667" data-media-id="49448" class="gb-media-cb3884c6" alt="Image placeholder" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/cowomen-YqBORf3ggKA-unsplash-2.jpg"  ....
    <img loading="lazy" decoding="async" width="1000" height="667" class="gb-media-4cf41d5a" alt="man working on a laptop" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/linkedin-sales-solutions-G_xz2zH-Z34-unsplash.jpg" title="linkedin-sales-solutions-G_xz2zH-Z34-unsplash"  ....
    <a href="https://sites.generatepress.com/keynote/"><img loading="lazy" decoding="async" width="244" height="52" class="gb-media-fc1697af" alt="Keynote logo" src="https://sites.generatepress.com/keynote/wp-content/uploads/sites/196/keynote-logo-rev.svg" title="keynote-logo-rev"/></a>
    

    Thanks!
    andoro

  • Hi Andoro,

    Try removing the static alt tag from the dynamic image.

    Dynamic image static alt tag

    This will make the image inherit the alt tag from the media library.

  • I have tried it, but did not helped.

  • Sorry, it worked for the blog page but not for the home page where two images are shown in the Latest articles section.

  • Hello,

    Did you actually edit the dynamic image inside the query loop in the homepage? Do those images have alt tags in the media library?

  • Hello,

    My mistake—I hadn’t updated it on the homepage. Now it looks good.
    Thanks again.

    andoro

  • Ok, no problem!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.