Hello, my first image shows variant images, but I want to show my 2nd image first because my 1st images look ugly. How can I do that? Glow Curtain: 400 LED Lights for a Magical Ambiance – InteriorGlows
Topic summary
A merchant wants their product page to display the second image as the active/default image instead of the first, because the first image (showing variant options) appears unattractive.
Initial Suggestion:
- Reorder images in Shopify admin by moving the second image to position 1
- This was clarified as not the desired solution
Technical Explanation:
- The issue relates to which image displays first when users land on the product page
- URL parameters like
?variant=123456789can control which variant image shows initially - The code uses
product.selected_or_first_available_variantlogic in theproduct-media-gallery.liquidfile
Current Status:
- The merchant has located the relevant code but doesn’t know how to modify it to select the second image by default
- Further developer assistance is recommended to adjust the template logic
- The discussion remains open with no concrete solution implemented yet
Hi @TrendBlend
You can consider moving the second image on this product page from position 2 to position 1 from Shopify admin and see if works or not. It seems like you would like to make your second image as the main image, and you can have a try to do so. Thank you!
Hello @Jenny6 that’s not exactly what I want to achieve. I want the second image to start as active instead of the first image to start as active.
Sorry about the confusing here @TrendBlend . I guess you may want to make second image display immediately when users access your product page.
You can further check if you visit the link has ?variant=123456789. If so, it will be the selected variant which will display at first, but if not, you can go to check your code page and see if there is product.selected_or_first_available_variant judgment in the code content or not. This issue may need further help from developers, you can check with them together. Thank you!
Hello @Jenny6 , thanks for your reaction! I do not have that in my visit link and the code in my product-media-gallery.liquid looks like this:
I see the product.selected_or_first_available_variant but I do not know how I can just select the 2nd one