Variant Images Group

Preview for hiding other variant images:

By adding the alt attribute to product images and grouping them by variant, you can achieve the effect of displaying only the image set for the currently selected variant. The specific steps are as follows:

Show Variant Image Group

Add the alt attribute to product images.

In the product editing page, select the images you want to group and add an alt attribute value, such as ###Purple. Images with the same alt value (prefixed with ###) will be grouped together.

Add Alt Attribute

Set variant images.

In the variant settings, assign a main image to each variant. All images in the same group as the main image will be displayed when that variant is selected.

Set Variant Images

Enable the "Hide Other Variant Images" setting.

In the theme editor, go to the product settings and enable the "Hide Other Variant Images" option. Once enabled, only the current variant's image group will be displayed, while other images will be hidden.

Enable Hide Other Variant Image Setting

Last updated

Was this helpful?