Shopify themes, liquid, logos, and UX
Hello
Just wanting to see if any one knows how to make the default picture be the first instead of the first variant. I am using the Ride theme and its been updated.
I have tried many of the other methods I have found on these boards and one works but doubles up on the default picture.
Thank you
Add this code in theme file
<div class="product-single__photos product-photos" data-product-single-photos>
{% for image in product.images %}
{% if image == product.selected_or_first_available_variant.featured_image %}
<div class="product-single__photo-wrapper">
<img src="{{ image.src | img_url: '1024x1024', scale: product_image_scale }}" alt="{{ image.alt | escape }}">
</div>
{% endif %}
{% endfor %}
</div>
Thank you for your reply.
Do I just add this to the bottom of the theme.liquid file?
I ended up adding it and the main image (the bigger image) disappeared.
2 years later and no one has a solution for you? I can't find a proper solution anywhere online. I'm thinking of just changing the theme at this point.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025