The Featured image is the first image of the variant instead of the default I set | Impact Theme

Topic summary

Issue: In the Impact theme, product pages with variants defaulted to a variant image instead of the store’s chosen default media.

Attempts: Editing product-gallery.liquid to use product.featured_image fixed the initial image but broke UI (image toggle disappeared, variant clicks unresponsive). Reordering images in Admin was suggested but did not resolve it.

Solution: In product-gallery.liquid, set:

  • default_media = product.featured_media
    This was tested and confirmed by the OP to work, restoring the default media as the first image without breaking gallery/variant functionality. Preview URL and screenshots were shared for context.

New follow-up: A user on the Dawn theme reported the same approach doesn’t work in product-media-gallery.liquid. No working Dawn-specific code was provided; a staff member suggested contacting Shopify Experts for custom help.

Status: Impact theme issue resolved; Dawn theme question remains open with no confirmed fix.

Summarized with AI on December 23. AI used: gpt-5.

When clicking on a product for which I have a variant, by default the first image is the variant’s image instead of the default media I set. The theme I’m using is Impact and I’ve tried contacting them but they don’t offer a solution.

I have tried editing code in product-gallery.liquid

replace the code into {% assign featured_image = product.featured_image %} (This is the code I found in other discussions)

Indeed, if I simply change this code, the first image problem is solved, but it will burst into many other problems, including the image toggle button disappears, clicking on the variant doesn’t respond, etc. I hope there is a solution, thanks!

Hello @Davidal , Please check if your default images set or main product image is set on the admin side as a first priority. Put the main/default images in the first priority and put other variant images after that image set. Please see the screenshot below.

Feel free to reach out if you have any questions or need assistance.

Hi DarShanp

Thanks for your reply. I have already done this but the problem still exists as I mentioned.

Hello @Davidal , Please share preview URL.

https://gigglegecko.com/products/anime-light-painting-picture-frame-jujutsu-kaisen-led-night-light-moon-lamp-satoru-gojo-figure-bedroom-home-decor-friends-gifts?variant=48710454673681

Like this.

@Davidal hey thanks fir posting here.

please use this one :

{%- assign default_media = product.featured_media -%}

i had tryed it is working

if it solved so please mark it , thanks.

@Davidal

Oh ProtoMan, it works! Thank you very much!

1 Like

:smiling_face: @Davidal

Hey man the code doesnt work for dawn theme can you help. section is product-media-gallery.liquid

Hey, @mickytoobr

I’m not formally trained in code to provide you with an exact solution. However, I’m confident one of our Shopify experts would be able to accomplish this at a reasonable price.

Just wanted to share this as an option in case you are unable to find a coding solution in your thread.