Hi,
there is an issue with the Image Element when it is used inside a Query Loop.
- When the Image Element is placed on a regular page, it correctly outputs the image’s alt text from the WordPress Media Library.
- When the same Image Element is used inside a Query Loop, the rendered
<img>element has an empty or missingaltattribute, even though the image has a valid alt text assigned in the Media Library.
This causes accessibility issues and is reported by tools such as Lighthouse.
Is this a bug or is there a setting required to preserve the media library alt text inside Query Loops?
Responses