Issue: Images added via Shopify’s content editor include alt text, but images inserted via custom Liquid/HTML with direct URLs do not display their alt text. The requester wants a way to automatically pull the correct alt text without manually adding alt attributes for each image.
Proposed approach: Use Shopify metafields to store image alt text and reference those metafields in Liquid to populate the alt attribute dynamically. A code example was mentioned but not provided in the thread.
Clarifications requested: Whether metafields need to be set up per image, how Liquid would retrieve and bind metafield values to the alt attribute for images referenced by URL, and whether there is a general code solution to apply alt text across all such images.
Status: No resolution yet; actionable guidance and a working Liquid snippet are still needed.
Key terms: “alt text” (alternative text for images used for accessibility and SEO), “Liquid” (Shopify’s templating language), “metafields” (custom data fields in Shopify that can be referenced in templates).
Summarized with AI on December 20.
AI used: gpt-5.
i have lots of images on my website and all of them have got alt text done from the content section of shopify. however, the ones which have been added in custom liquid or html with the links, are not showing their alt text
is there a way to rectify this so that it picks up the alt text related to the image
rather than having to add the alt text to every single image in the html or custom liquid
thank you. im not quite sure how this works. Do i need to setup metafields for the images? how will they be pulled in from the metafields?
right now the alt text is in shopify, but because we have input the link of the image in custom liquid, it is not pulling the alt text through
ive been told to add the alt text for all the images i have used as a link, so wondering if there is a code which would pull all the alt text through for any images which are installed this way