A merchant seeks to display only variant-specific images when a color option is selected, rather than showing all variant images in the product gallery simultaneously. The issue causes cluttered product pages with numerous thumbnails.
Proposed Solutions:
CSS hiding: Simple approach to hide thumbnail gallery, but removes all thumbnails including non-variant images
Liquid code filtering: Use image.attached_to_variant object or alt-tag identification to conditionally display images. Requires editing product-template.liquid file with code like {% if image.attached_to_variant == false %}
Implementation requires Liquid/HTML knowledge or Shopify’s 60-minute complimentary Theme Support (available with paid plans)
Custom themes may have different file structures than standard Shopify themes
Status: Multiple participants report varying success with code-based solutions. The discussion remains active with ongoing requests for implementation guidance and feature additions like image zoom.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
It is possible, but is a little bit complicated to set up.
The way we have done this in the past is you need to identify the images that need to stay and images that are variants. This can be done in the image alt fields. If you add text there (for example ‘variant’) then you can write in the liquid code to not display those images with that ‘variant’ alt tag.
An alternative way to do this is to use the ‘image.attached_to_variant’ object. Thought this up while writing this, so haven’t tested it, but in theory you could use this to identify if it is used on a variant and not have to use the alt field with the ‘variant’ tag.
Elias here with Shopify Support. Thank you for reaching out.
There is a solution for this, which involves hiding the variant thumbnails and having the product image change based on the selected variant.
The first part is to customize your theme so that your products will show the featured image until a variant is selected. This is something you can try doing on your end and save some design minutes. If you have limited knowledge with HTML, CSS, Javascript, and Liquid; our Theme Support team will be able to help with this. This will be free of charge as part of the 60 minutes of design time that is included with your subscription.
The next step will be hiding the variant thumbnails, which I can send up to our Theme Support team. I have already located your store and I can update you with a support ticket. Before I send up the request, could you confirm if you’d like me to send one or both requests?
Elias here with Shopify Support again. Thank you for confirming.
I’ve sent you an authentication email with ticket number (#14893726). Kindly check your account owner’s email and send me a reply. This way, I’ll be able to forward the request to our Theme Support team right away.
Hi, I am trying to hide my variant images from the product pages and still have images that are not variants show up. How would I use this object “image.attached_to_variant” and in what template would I drop it achieve this. You had started talking about it and it sounds like a great way to achieve my goal. But, I have never used liquid/shopify so am lost. Thank you so much.
All experts can’t help me ,so i give up. Shopify assistance says that i need an expert, and i even apenas some money ,and they don’t fix me the problem.
That’s a great question! There isn’t a way to bulk delete or manage multiple products’ images directly on Shopify; however, you can overwrite the images for multiple products by using CSV files. CSV files will be the fastest method to manage images for multiple products. To do this, you can export your products as a CSV first. Then remove or update the photos links in the CSV. After that, you can re-upload the CSV and overwrite the existing products. It will looks like this:
Another option is by using a third-party app, such as Excelify, which provides tools to bulk edit or import product images directly through their app. If you need any help with this app, you can always reach out to the developer directly through the contact information found in the Support section of their app’s page.
I hope this provides a couple of solutions for you to try out. If you have any other questions on this topic, don’t hesitate to let me know in this thread!
I added a check to see if the image was attached to a variant. Try to look for a section that looks like this in the product-template.liquid.
{% comment %}
Show other product images below product info if there's any left to show
{% endcomment %}
{% if index < product.images.size %}
{% for image in product.images offset:index_offset %}
**{% if image.attached_to_variant == false %}**
.....
Thank you for joining the thread! I understand you’re also looking to hide the variant images. Though I’m unable to help with custom coding, this may be something our Theme Support can help you with. If you’re using a Shopify theme and your store is subscribed to a plan, I’d be happy to send a customization request on your behalf to our Theme Support team.
Just to confirm, is this something you still need help with?
Thank you for joining the thread! I understand you’re trying to find the same section that @yanceyr was referring to, more specifically the product template. Typically, the product template is named ‘product-template.liquid’. however, this may vary between Shopify, third-party, or custom themes. When you edit the theme coding on a Shopify theme or a third-party theme from our Theme store, the ‘product-template.liquid’ can be found in the Sections folder. It’s important to note, this may vary with custom or third-party themes acquired outside our Theme store.
I hope this helps you locate that section! If you have any other questions on this topic, please don’t hesitate to let me know!