Skip to main content

Variant Image Gallery

Jalal avatar
Written by Jalal
Updated yesterday

In the Next theme, you can create variant image galleries. As shown in the example below, the images update automatically based on the selected variant.

Step 1: Create a Variant Metafield

  1. Go to your Shopify adminSettingsMetafields and Metaobjects.

  2. Select Variants and click Add definition.

  3. In the Name field, enter your preferred name (e.g., Variant Image Gallery).

  4. For the Type, choose File, and set it to List of files.

You should now see a screen similar to the one below:

Step 2: Assign Images to Variants

  1. Go to Products → open the product you want to edit.

  2. Scroll down to Variants and click the variant you want to update.

  3. You’ll now see the metafield you just created.

  4. Select all the images related to that variant option and click Save.

Step 3: Connect the Metafield in the Variant Picker

  1. Open the Variant Picker element settings in your theme editor.

  2. Under Variant Gallery, select the metafield you created for variant images.

  3. To find the metafield key, return to SettingsMetafields and MetaobjectsVariants.

  4. Copy the key and paste it into the Variant Picker element settings.

As soon as you connect the metafield, the images you added will automatically display for each variant option.

Did this answer your question?