Hi @Nikoscapone
Step 1: Go to Your Theme Code
- From your Shopify admin, go to Online Store → Themes.
- Find your live theme (e.g., Dawn) → click … → Edit code.
Step 2: Open the Product Template
- In the sidebar, open:
sections/main-product.liquid
2.(In older versions, it might be product-template.liquid)*
Step 3: Find the Default Selected Variant Code
Search for this line (or something similar):
{%- assign selected_variant = product.selected_or_first_available_variant -%}
This line tells Shopify to automatically select the first available variant — that’s why its image shows up first.
Step 4: Replace It
Replace that line with this:
{%- assign selected_variant = null -%}
This change ensures no variant is pre-selected when the product page loads.
Step 5: Disable Auto-Select in JavaScript
Scroll down near the bottom of the same file, or open:
assets/product-form.js
Find code similar to:
this.currentVariant = this.getVariantData()[0];
Comment it out or remove it:
// this.currentVariant = this.getVariantData()[0];
This stops the first variant from being selected automatically via JS.
Step 6: (Optional) Reset the Image to Featured
If you want to make sure the first featured image always shows first, add this snippet right after your product media loop begins in main-product.liquid:
{%- assign featured_image = product.featured_image -%}
<img
src="{{ featured_image | image_url: width: 1200 }}"
alt="{{ featured_image.alt | escape }}"
class="featured-image"
>
Step 7: Save and Test
- Save your changes.
- Go to your product page in an incognito window or after clearing cache.
- The main featured image should now display first — not the first variant image.
Best regards,
Devcoder 