Where you can achieve what your competitors can’t


Shopify Show Variant Pictures as Swatches On Product Page (without apps)

Displaying variant images as clickable swatches on your Shopify product pages elevates visual clarity, streamlines option selection, and drives confident purchasing unlocking several strategic advantages:

Visual Clarity

• Presents true to life thumbnails for every color, style, or material, eliminating guesswork.
• Keeps your main gallery focused while still surfacing every angle in miniature form.
• Adds polished, brand aligned styling through customizable borders, shapes, and hover states.
• Ensures crisp rendering on retina displays by serving properly sized CDN cached assets.

Shopping Experience

• Lets customers preview a variant with a single tap or hover, updating the hero image instantly.
• Reduces cognitive load by replacing long dropdowns with intuitive, picture-driven choices.
• Enhances mobile usability finger-friendly thumbnails beat tiny radio buttons every time.
• Improves accessibility when each swatch includes descriptive alt text and ARIA labels.

Conversion Lift

• Boosts add to cart rates by showcasing the unique appeal of every variant, not just the default.
• Lowers return rates as shoppers see the exact shade or pattern before purchase.
• Encourages upsells to premium or limited edition variants that look more enticing in swatch form.
• Creates urgency when out of stock swatches auto-grey, prompting quicker decisions on what’s left.

Merchandising & Insights

• Surfaces click through data on the most viewed swatches, guiding inventory and marketing spend.
• Enables targeted promotions link directly to a pre-selected variant in ads or emails.
• Supports seasonal storytelling by swapping swatch imagery without re-shooting the full gallery.
• Allows badges like “New” or “Bestseller” to sit directly on individual swatch pics for extra impact.

CODE 1 : product-variant-options.liquid

{%- elsif picker_type == 'button' -%}
    <input
      type="radio"
      id="{{ input_id }}"
      name="{{ input_name | escape }}"
      value="{{ value | escape }}"
      form="{{ product_form_id }}"
      {% if value.selected %}
        checked
      {% endif %}
      {% if option_disabled %}
        class="disabled"
      {% endif %}
      {{ input_dataset }}
    >
    <label for="{{ input_id }}">
      {{ value -}}
      {{ label_unavailable }}
    </label>

CODE 2 : replace

{%- elsif picker_type == 'button' -%}
    <input
      type="radio"
      id="{{ input_id }}"
      name="{{ input_name | escape }}"
      value="{{ value | escape }}"
      form="{{ product_form_id }}"
      {% if value.selected %}
        checked
      {% endif %}
      {% if option_disabled %}
        class="disabled"
      {% endif %}
      {{ input_dataset }}
    >
    
    {% if option.name == 'Color' %}
      {% assign variant_image = blank %}
      {% for variant in product.variants %}
        {% if variant.options contains value %}
          {% if variant.image != blank %}
            {% assign variant_image = variant.image %}
            {% break %}
          {% endif %}
        {% endif %}
      {% endfor %}
      
      {% if variant_image != blank %}
        <label for="{{ input_id }}" style="background-image: url({{ variant_image | img_url: '50x' }});height:40px;width:40px;background-size: cover;border-radius:50%;"></label>
      {% else %}
        <label for="{{ input_id }}">
          {{ value -}}
          {{ label_unavailable }}
        </label>
      {% endif %}
    {% else %}
      <label for="{{ input_id }}">
        {{ value -}}
        {{ label_unavailable }}
      </label>
    {% endif %}