Hello there!
I am currently working on creating colour swatches using variant images and am coming across an issue where the swatch is returning the variant image for all variants (colour and size) rather than the requested one. As a result the image swatch displays the first variant image - which is the same for all colours.
I’m a bit of a newbie so not sure where I am going wrong. Would be grateful for any help/suggestions.
This is a preview of the product page: https://lktmg7oe2kzf9afu-54300377279.shopifypreview.com/products/lighthouse-outback-full-length-ladies-waterproof-raincoat?_pos=2&_sid=6f476b6f0&_ss=r
{%- if is_color -%}
{%- liquid
assign option_index = forloop.index0
assign values = ''
assign max_count = settings.color_swatches_max_items
assign has_color_option = true
-%}
{%- else -%}
{%- endif -%}