How to show only variant images of a selected option.

Shopify Partner
1 0 0

Hello everyone,

I'm new to shopify and for a product I need to show only variant images of the current selected color. My other option is the size. For examplen I have a product with 2 color options in red and green and 2 size options small and big. I have 4 variants with images, one for each combination (red,small),(red,big) ,(green,small) ,(green,big). When I select a color I only want to show the variant images with the selected color. I Need to code it by myself, has anyone an idea how to achieve this? One very pity thing is, that I can't access product.variants.featured_image.variant_ids like its availabe in the JSON model of the product, but it's not accessible over liquid classes.



Greetings and any help is appreciated.

Reply 1 (1)

Shopify Partner
1014 139 147

Hello, You need to find everything you need to know by watching this tutorial:

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here