How to Add Variant Images in Shopify (3 Easy Methods)

How to Add Variant Images in Shopify (3 Easy Methods)

Introduction

When selling products with multiple options such as size, color, or style so customers expect the product image to update as they choose a variant. Shopify makes this possible by letting you assign variant-specific images so shoppers see exactly what they’re selecting. This not only improves the shopping experience but also reduces confusion, builds trust, and can boost conversions.

In this guide, you’ll explore how to add variant images in Shopify using three methods: directly in the Shopify Admin, with custom coding, or by using Shopify apps.


Why Add Variant Images?

Adding variant-specific images enhances the user experience by displaying customers with the exact product option they select. It builds trust by reducing confusion and lowering the chances of returns. When shoppers can clearly preview their chosen variant, they’re more likely to complete the purchase, boosting conversions. Plus, having clean and professional product pages strengthens your brand’s overall look and feel.

 

Methods for Adding Variant Images in Shopify

There are different methods for Adding Variant Images in Shopify. Some of these are listed below.

  1. Assign Variant Images in Shopify Admin
  2. Add Variant Images with Custom Coding
  3. Add Variant Images using Apps


Method 1: Assign Variant Images in Shopify Admin

You can easily assign specific images to each product variant directly in the Shopify admin. This ensures that when customers select a different size, color, or style, the matching image updates automatically on the product page. Follow these steps to add Variant Images in Shopify Admin.

Step 1: Navigate to Shopify Admin > Products.

How to Add Variant Images in Shopify

Step 2: Choose the product that you want to update.

How to Add Variant Images in Shopify

Step 3: Upload all variant images in the Media section of the product.

How to Add Variant Images in Shopify

Step 4: Scroll down to the Variants section and add variant images for each variant.

How to Add Variant Images in Shopify

Step 5: Save the changes.

How to Add Variant Images in Shopify

Step 6: When customers choose a variant, Shopify automatically swaps the product image.

 

Along with strong visuals, optimizing your product data also boosts trust and visibility. Learn how to Add Schema Markup to Shopify for better search rankings and click-through rates.

Method 2: Add Variant Images with Custom Coding

If your theme doesn’t support variant image switching by default, you can add it using custom code. By editing your theme’s files, you can display the correct image whenever a customer selects a different variant. Follow these steps to add Variant images using Custom Coding.

Step 1: Navigate to Shopify Admin > Products.

How to Add Variant Images in Shopify

Step 2: Choose the product that you want to update.

How to Add Variant Images in Shopify

Step 3: Upload all variant images in the Media section of the product.

How to Add Variant Images in Shopify

Step 4: Scroll down to the Variants section and add variant images for each variant.

How to Add Variant Images in Shopify

Step 5: Save the changes.

How to Add Variant Images in Shopify

Step 6: Navigate to Online Store > Themes > Edit code.

How to Add Variant Images in Shopify

Step 7: Go to the product-template.liquid or main-product.liquid file depending on the theme.

How to Add Variant Images in Shopify

Step 8: Locate the variant picker code or add it to your desired location if it does not already exist. Replace the default dropdown color code with the Variant image swatches.

  
    <div class="variant-swatches">
      {% assign color_options = '' %}
      {% for variant in product.variants %}
        {% assign color_value = variant.option1 %}
        {% unless color_options contains color_value %}
          {% assign color_options = color_options | append: color_value | append: ',' %}
          <label class="swatch">
            <input 
              type="radio" 
              name="Color" 
              value="{{ color_value }}" 
              data-variant-id="{{ variant.id }}">
            <span 
              class="swatch-bg" 
              style="background-image:url('{{ variant.featured_image | default: product.featured_image | img_url: '200x200' }}');">
            </span>
          </label>
        {% endunless %}
      {% endfor %}
    </div>
  

Step 9: Add some CSS for Swatch styling in your theme.css or base.css file, depending on the theme.

  
    .variant-swatches {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin: 15px 0;
    }

    .swatch {
      position: relative;
      cursor: pointer;
    }

    .swatch input {
      display: none;
    }

    .swatch-bg {
      width: 45px;
      height: 45px;
      border: 2px solid #ddd;
      border-radius: 50%;
      background-size: cover;
      background-position: center;
      display: block;
      transition: all 0.3s ease;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .swatch:hover .swatch-bg {
      border-color: #333;
      transform: scale(1.05);
    }

    .swatch input:checked + .swatch-bg {
      border-color: #000;
      box-shadow: 0 0 0 2px #000 inset;
    }
  

Step 10: Save the changes.

 

Method 3: Add Variant Images using Apps

You can simplify the process of assigning images to product variants by using Shopify apps. These apps often offer features like bulk image uploads, automatic variant-image matching, and advanced display options without needing to edit code. Follow these steps to add Variant Images using the Shopify Apps.

Step 1: Navigate to Shopify Admin > Apps.

How to Add Variant Images in Shopify

Step 2: Click on the App and sales channel button.

How to Add Variant Images in Shopify

Step 3: Visit the Shopify App store.

How to Add Variant Images in Shopify

Step 4: Search for the app, such as Globo Product Options, Variant.

How to Add Variant Images in Shopify

Step 5: Install the App.

How to Add Variant Images in Shopify

Step 6: Reconfirm the installation in the Shopify Admin.

How to Add Variant Images in Shopify

Step 7: Click on the Create option set button.

How to Add Variant Images in Shopify

Step 8: Click on the Add element button and add options of your choice, like Image Swatch.

How to Add Variant Images in Shopify

Step 9: Select the image here.

How to Add Variant Images in Shopify

Step 10: Select the products where you want to add this Option set.

How to Add Variant Images in Shopify
Step 11: Save the changes.

Step 12: Navigate to Online Store > Themes > Customize.

How to Add Variant Images in Shopify

Step 13: Check this box and save the changes.

How to Add Variant Images in Shopify

Step 14: Navigate to the Product page in the Customizer and in the Product information section, add a block related to that app.

How to Add Variant Images in Shopify

Step 15: Save the changes.

Some popular apps are listed below:

For additional no-code improvements, see: How to Change View Cart Color in Shopify (Easy Methods)

Conclusion

Adding variant images in Shopify is one of the simplest yet most powerful ways to improve your product pages. Whether you choose the built-in Shopify Admin method, apply custom coding for advanced layouts, or use apps for automation, showing customers the correct variant image ensures a clear, professional, and user-friendly shopping experience.

Want to maximize the impact of your product visuals? Our Shopify CRO Experts Services focus on boosting conversions through optimized layouts, while our Shopify SEO Agency helps your products rank higher and reach more shoppers.

Frequently Asked Questions

Variant images are product photos linked to specific options (like size, color, or style). When a customer selects a variant, the corresponding image automatically updates.

Yes. Shopify lets you upload and assign variant images directly in the Product settings from the Admin panel, no coding required.

Shopify’s native admin doesn’t support full bulk uploads, but you can use apps like Easy Variant Images, Globo Product Options, or SA Variant Image Automator for faster management.

No. Apps are optional. You can manage them manually in the admin or customize your theme with Liquid code for advanced layouts and swatches.

Not if you use optimized, compressed images. Shopify automatically resizes and compresses product images to maintain store speed.

Yes. With custom coding or apps, you can display color/image swatches instead of dropdowns to make the shopping experience more visual and user-friendly.

They reduce confusion, build trust, and let shoppers preview exactly what they’re buying. This lowers return rates and increases the likelihood of a completed purchase.

Comments(0)
You don't have any comments yet

Are You Looking for a Shopify Expert?

We design, develop, optimize, and scale high-converting Shopify stores.

Get in touch
Let's Connect
Shopify Plus eCommerce Development Agency ecomx agency

Looking for a Trusted Ecommerce & Shopify Plus Agency?

We design, develop, optimize, and scale high converting Shopify Ecommerce stores that drive sales.

Get in Touch
Ecomx shopify plus agency about us page Yasin

Looking for a Shopify expert to handle a small task? Shopify Migration Experts Agency Ecomx shopify plus agency

Let’s talk about your project

Shopify Custom Theme Development Services Live Chat