Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I changed a product image, uploaded a smaller jpeg file, changed to semantic name and added alt text, and now the product image will not render and for some reason seems to have display: hidden css added to the tag.
See the missing image space, on this product url; https://forhm.com/products/placemat-set-2-butterfly-characters?variant=42089028878575
Can someone please advise what's going on here?
Here's the html <li> element attributes as shown by Chrome inspector:
<li data-thumbnail-set-number="Green..." class="product__media-item grid__item slider__slide" data-media-id="template--15372759597295__main-33012002521327" data-media-index="7" style="display:none">
Solved! Go to the solution
This is an accepted solution.
The problem here was due to my theme having been updated years ago with code to enable the product variant selection buttons to show only certain images with alt tag values that correspond to the product variant featured image's tag value. I'd changed the tag value of a newly uploaded image without realising that there was logic built into the JS which required a certain alt text value in order to render the image.
What do you mean by images whose html tag contains the tag style="display: none".
In my opinion, it is because of your setup that images corresponding to each variant of your product appear
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Thanks for the reply and help BSS-Commerce. I found the problem and detailed it in my other reply to this post.
This is an accepted solution.
The problem here was due to my theme having been updated years ago with code to enable the product variant selection buttons to show only certain images with alt tag values that correspond to the product variant featured image's tag value. I'd changed the tag value of a newly uploaded image without realising that there was logic built into the JS which required a certain alt text value in order to render the image.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025