How do I assign colour variant to product image for that specific colour on dawn theme 15.0 - code

Topic summary

A Shopify store owner using Dawn theme 15.0 seeks to link color variant selections to specific product images, so clicking a color (e.g., orange) displays only that color’s images.

Two Main Solutions Emerged:

  1. No-Code Method: Assign featured images to variants in product admin and enable “Pick an option” in the theme customizer. Limitation: shows only one image per variant, not multiple images for the same color.

  2. Code-Based Solution: Requires three steps:

    • Add alt text to product images matching variant color names exactly
    • Replace code in product-media-gallery.liquid file
    • Add JavaScript to main-product.js

Key Challenge: Users want all product images visible initially, but filtered to show only relevant color images when a variant is selected. The default behavior shows either all images or only single variant images.

Current Status: Mixed results reported. Some users successfully implemented the code solution, while others (particularly on Trade theme) report it’s not working. The discussion remains active with ongoing troubleshooting, particularly around displaying multiple images per color variant while maintaining proper filtering functionality.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Oh yeah, that is super easy.

-Go back to your product page

-Now under the category metafield section click on the color and it will open up this:

-Just click the clear button and it will replace it with the default color. If for some reason you color is not found because it has a weird name just make sure you have a color selected under the color tab and something selected under base color and leave the image blank and you are set.

1 Like