When an image src is populated by a parameter, it doesn’t automatically populate the Alt Text based on the media item’s alt text.
To demonstrate:
An image element with the Source set directly has its alt text show up like this in the inspector:
And has the correct
alt
tag in the html:However when it is pulling in a parameter, it shows like this in the inspector:
And has the default
alt="Image"
tag in the html:Although is some instances having the Alt Text as a separate parameter is feasible, the benefits of being able to set the image alt text in the media library and have it pull through automatically are really great.
Would there be a way to have this pull through automatically, if the Alt Text is left blank, or else to access the Alt Text of an image parameter via an argument, e.g. {{dc:p:image return="alt-text"}}
or something akin to that?
Cheers!