Dawn2.0 theme - why are product images not appearing?

Solved

Dawn2.0 theme - why are product images not appearing?

jbk1
Excursionist
24 3 4

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">

Accepted Solution (1)

jbk1
Excursionist
24 3 4

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.

View solution in original post

Replies 3 (3)

BSS-Commerce
Shopify Partner
3477 463 536

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

view - 2023-12-15T180945.790.png

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


BSS Commerce - Full-service eCommerce Agency
jbk1
Excursionist
24 3 4

Thanks for the reply and help BSS-Commerce. I found the problem and detailed it in my other reply to this post.

jbk1
Excursionist
24 3 4

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.