Maintaining Consistent Active Image for Color Variants in Product Gallery

modadorafashion
Visitor
1 0 0

I'm currently working on a Shopify store, and I'm facing a challenge with the product gallery. I have a product with multiple color variants, and I'd like to associate each color variant with its own set of images.

However, I want to keep a consistent "print color" image as the active image in the gallery, regardless of the selected color variant. Currently, when I select a different color variant, the active image changes automatically to one associated with that variant.

I've tried updating the gallery logic, but I'm unsure of the best approach to achieve this. How can I link color variants to specific images while maintaining a consistent "print color" image as the active one?

Here's an example URL of my product with Pink and Blue color variants:

Can anyone provide guidance or share a code snippet that helps me achieve this?

Reply 1 (1)

Ihor-Sh
Shopify Partner
28 4 12

Hi @modadorafashion some additional job needed with metaobjects there.
Or simple way just to use app like this https://apps.shopify.com/variant-image-wizard

 

Shopify troubleshootibility 😉