alt text not being recognised

alt text not being recognised

ihs1
Explorer
106 1 11

HI

 

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

Replies 2 (2)

Small_Task_Help
Shopify Partner
830 27 75

Hi,

 

Try to use Metafield for Image Alt Text

 

Code example to link the Alt Text with the Image in Liquid

<img src="{{ 'your-image-url-here' | asset_url }}" alt="{{ your_object.metafields.global.alt_text }}">

 

To Get Shopify Experts Help, E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad
ihs1
Explorer
106 1 11

HI

 

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