Hello! I’ve been trying to achieve something like this, where I can render the two images linked to a color variant and make them selectable, and then only the available sizes linked to a specific color are rendered in the select tag.
If I use a for loop and add the image inside it, it renders the image for all the sizes available so I would need to render only if the image is unique, but I can’t check that within the for loop.
I’ve tried to create a new array and push each image from the for loop to it, with something like:
{% assign imageSrc = variant.featured_image.src | split:‘_’%}
so I can then filter with uniq, but Shopify seems to only render img urls coming directly from variables.
Any suggestion would be very welcome!
Thanks