New Shopify Certification now available: Liquid Storefronts for Theme Developers

Alt tag {{ image.alt }} missing if image comes from Theme settings

crusco
Tourist
10 0 3

I've noticed that `{{ image.alt }}` isn't working properly.

- It returns null if the image was uploaded and retrieved from a section (Theme settings/customizer). (With section I mean for example those that appear on the homepage created thru schema, Theme settings/customizer)

- It works if the image comes from an Article, Product.

I've checked and all Shopify themes have this problem.

It's pretty damn bad for SEO, because you've a lot of empty <img alt=""> images on the homepage.

 

Any suggestions on how this can be fixed?

 

Replies 3 (3)
UmairA
Shopify Partner
1106 101 225

Hey there @crusco ,

Yes, you are right, it's not good for SEO but the Shopify theme can't determine the alt-text themselves so the alt text needs to be added by the user. I agree that image picker sections should come with a text field to enter alt-text.

Splodge1
Excursionist
13 0 3

Hi, any updates on this (or workarounds)? We added a collections section to the Homepage and added Alt Text to the image but on the live page th ealt text is blank. See Picture block below:
Agree its a major SEO Issue especially as its the Website Homepage.

<picture style="display: none;"><source data-srcset="//cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_750x960_crop_center.jpg?v=1687349554 750w, //cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_1000x.jpg?v=1687349554 1000w, //cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_1500x.jpg?v=1687349554 1500w" sizes="572px" srcset="//cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_750x960_crop_center.jpg?v=1687349554 750w, //cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_1000x.jpg?v=1687349554 1000w, //cdn.shopify.com/s/files/1/0522/3566/5561/files/BLOCK-2_1500x.jpg?v=1687349554 1500w"><img alt="" class="lazyautosizes Image--lazyLoaded" data-sizes="auto" data-optimumx="1.4" data-parent-fit="cover" sizes="572px"></picture>

 

Update there is a fix posted here for the Dawn Theme:
https://www.gomasuga.com/blog/fix-shopify-collection-image-blank-alt-text