Users seek to display featured lifestyle images first on Dawn theme product pages, rather than having variant images auto-selected. The default Dawn behavior prioritizes variant images, which creates confusion especially for single-variant products.
Early Solutions (Posts #2-3):
Modify main-product.liquid by replacing specific code blocks
Add custom JavaScript to hide featured images when variants are selected
These approaches partially worked but hid variant images until selection, causing usability issues
Ongoing Challenges:
Original poster (#4) reports solutions hide variant images inappropriately
Multiple users (#7-11) note the referenced code doesn’t exist in newer Dawn versions (11.0+)
One user (#13) reports a suggested solution deletes the main image entirely
Working Solution (Post #16):
Wrap initial code section in {%- if product.selected_variant -%} condition
Add JavaScript to unselect first variant if none pre-selected via URL parameter
Add class to fieldset in product-variant-options.liquid
User #18 confirms this works, noting it requires ‘stacked’ or ‘2-column’ gallery layout (not ‘thumbnail carousel’)
Status: Partially resolved for some Dawn versions, but compatibility issues persist across theme updates.
Summarized with AI on October 24.
AI used: claude-sonnet-4-5-20250929.
I’ve been searching and realize it is automatic functionality for the Dawn theme to select and show the variant image first on the product page instead of the featured image. This is definitely not preferred as I want the lifestyle images to show first when a customer lands on the product page, and the variant images last.
I implemented the code solution offered in this post:
It works but it hides the variant image completely from the page until a variant is selected. This would be fine but a lot of my products only come in one color, so it won’t show the stock photo when clicking on black for example, but only when the customer selects a size. This just seems like it would be janky and confusing for the customer.
Is there any way to show the featured image first while maintaining the functionality of showing the variant stock image when selected?
Thanks for the response. I’ve implemented this but it is having the same behavior as I described in the post: Hiding the variant image until a variant is selected (in this case when I only have one color available) it will show the variant image only when someone selects the size, which is confusing.
I prefer the variant image to be shown in the Media Order I select on the product backend, but not be auto selected as the featured image on the front end product page, but scrolled to or shown when a customer selects a variant.
I don’t have this {%- if product.selected_or_first_available_variant.featured_media != null -%} anywhere in main-product.liquid section. I used the find option and it’s not there. Please advise. Thanks.
First of all, thank you very much. I am currently using this in my Dawn theme, and it is working perfectly. However, I am planning to upgrade my Dawn theme to the latest version. My current Dawn version is 4.0, and I noticed that the latest Dawn theme doesn’t have that line of code. Can you provide an updated solution?
I wanted to share a solution I discovered that might help others. I’m using the Ride theme from Shopify (a free theme), and I found that its logic is quite similar to what’s shown in the video, so I was able to implement the fix easily.
In my case however, I wanted the selected variant to appear first when:
A variant is selected by default using the ?variant= URL parameter, or
You refresh the page after selecting a variant.
Instead of commenting out the initial section like in the video, I wrapped it in this condition:
{%- if product.selected_variant -%}
Additionally, I added this JavaScript snippet at the bottom of the file to unselect the first available variant if no variant is pre-selected when the page loads:
For this JavaScript to work, I added a class to the under {%- elsif picker_type == ‘button’ -%} in product-variant-options.liquid:
option-{{ option.name | handleize }}
This allows the script to specifically target and unselect the color option. It also helps to have the color option listed first in your product options (you can arrange this in the product admin).
I’ve been searching for a solution on this for a very long time and this is the only one that worked! Just a note, add additional {%- endif -%} at the end of the section to close the added code. I think this code doesn’t work for ‘thumbnail carousel’ option for desktop as it doesn’t show the main photo on the first page load. I changed mine to stacked and it worked perfectly. Also works for 2-columns. Thank you for your help!
Find the part that starts with <ul id="Slider-Gallery-{{ section.id }}" class="product__media-list contains-media grid grid--peek list-unstyled slider slider--mobile" role="list" >
There’s a dropdown menu icon on the left, click on those couple of times until you find the part with . Like so:
We are modifying the part that does the selection for the image we show first in the website. In the original, it checks if a variant is selected and makes that the first one. In our version, we remove this check.
Original checks again to make sure it’s not doing the next images’ things for the first image. Since we don’t need that, it’s also removed.
Then there’s the decision of which image is active, i.e shows big on the page. Half of that decision has been removed with variant selection part and for the other half, we simply make the first image active. If no image active, nothing shows up in the big area, which was the issue of the above video, though it was very helpful for finding the exact fix area.
It’s working for my clients’ websites, with Dawn theme version 15.2.
This part fixes the gallery part but not the thumbnails. For thumbnails fix follow the steps:
In the same product-media-gallery.liquid file, find the line that starts with:
<ul id="Slider-Thumbnails-{{ section.id }}"
In this, there will be a part that looks like this:{%- if featured_media != null -%} Find this and close the dropdown from the left.
Right after the {%- endif -%} part, there’s a part that starts with {%- for media in product.media -%}Also close the for section from the left-handside dropdowns.
Add {% comment %} before the {%- if featured_media != null -%}.
Add {% endcomment %} after the {% endfor %. Should look like this: