How to show default product image until a variant is selected?
Edited
When products have variants, the image of the selected variant is displayed when the product page loads. You can change this to show the first product image by adjusting the theme code. Navigate to Online store > Themes, click ... on your copy of your theme, and then click Edit code.
You’ll be looking for the product-images.liquid file in your Snippets folder and search for the following code:
assign featured_media = product.selected_or_first_available_variant.featured_media | default: product.featured_media
Then update the code to:
assign featured_media = product.featured_media
Was this article helpful?
Sorry about that! Care to tell us more?