I want to select my own main photo (screenshot attached) instead of displaying the first variant photo. I’m confused about what code to delete versus edit. I’d love some clear guidance.
The best possible way which I believe you already know but just to confirm is adding that main image that you need to show as the product page loads as the first image in the media library inside your product.
@mk331 If you want to keep the variant images but stop Crave from automatically switching the main image, I’d look at the variant media logic rather than trying to hide the images with CSS.
Crave is using the selected variant to decide which media gets shown, so the cleaner fix is to change that JavaScript behaviour.
I’d also test it with products that have multiple variants and multiple images per variant. It’s easy to fix one product and accidentally break the gallery for the others.
Just want to add another solution you could consider in case you want more freedom and control over which image is displayed when customers select an option without editing your Crave theme code by using Aris Product Options’ Change product image upon option selection feature.
Instead of being limited by Shopify’s native variant-image setup, you can assign the specific image you want to appear for each option value. This gives you more flexibility to control the product images customers see as they click through the different options.
This could be a good workaround if you’d rather avoid modifying the Crave theme code directly and I believe could be useful when Shopify’s native variant image behavior is limiting which image appears first.