How to set up variant media
By default, Helix shows only the featured image for the selected variant. The variant gallery metafield lets you give each variant option value its own full set of media — images and videos — which changes two places:

Selecting a variant (for example, "Red") swaps the whole gallery to that variant's media, so shoppers see every red image and video instead of just the featured image.

Selecting a variant swaps the card's primary image to that variant's image, and its secondary (hover) media to the first item in that variant's gallery, replacing the card's usual second image.
How it works
Helix reads the custom.variant_gallery metafield on a variant. When a customer selects a variant, the gallery shows the variant's own image first, then the media stored in that metafield.
Variant media only works when Only show media of the selected variant is on (theme editor → Theme Settings → Variant pickers). With it off, Helix ignores the metafield and the product page shows all of the product's media. The setting is on in the Helix, Marlow and Selene styles.
Step 1 — Create the metafield definition
In Shopify admin, go to Settings → Metafields and metaobjects → Variants.
Click Add definition and set:
Name —
Variant galleryNamespace and key —
custom.variant_galleryType — File, list of files, with Accepted file types set to Media files only (images and videos)
Click Save.

Step 2 — Add media to each variant
In Shopify admin, go to Products and open a product.
In the Variants section, open the first variant of an option value (for example, the first size of "Red").
Scroll to Metafields → Variant gallery.
Add the images and videos that should appear when this option value is selected. Skip the variant's own image — Helix always shows it first.
Click Save.
Repeat for the first variant of every other option value.

Last updated