Hi! I am using the Horizon theme and am wanting to use custom uploaded images for some of my variant options vs just pills with text. A few things to add:
I know you can do this with meta fields for colors, but I need to be able to do it for other variants besides colors.
I don’t necessarily want the images to be thumbnails on the product itself, just image swatches for variants
I do NOT want to use any apps. Coding is fine but I don’t know how to write my own code, so just need direction.
Anyone have any insight? I’ve tried looking through the Shopify forums but most everything I’ve found aimed towards the Dawn theme.
I am currently using an app and really want to get rid of it for various reasons. Here is a screenshot of one of my products to show what I’m trying to achieve, just without an app:
Based on your requirements, I would suggest the following approach:
Create small swatch images (for example, 64 × 64 px) and name them to match your color variants (e.g., blue-denim.png).
Upload these images to Content → Files in your Shopify Admin.
Then, customize the theme so it first checks whether a matching image exists in Content → Files. If a matching image is found, it will be used as the color swatch. If not, the theme will automatically fall back to its default swatch/color functionality.
This approach allows you to use custom swatch images where available while keeping the default behavior for all other variants.
make these theme edits:
3a. Add those custom codeblocks b/w the green comments in the file snippets/swatch.liquid (deeplink:
admin.shopify(dot)com/store/yourstorename/themes/150988128433/?key=snippets/swatch.liquid)
3b. In this file (deep link: admin.shopify(dot)com/store/yourstorename/themes/150988128433/?key=snippets/variant-main-picker.liquid) add two edits given given in between green comment.
theme’s “Swatches” switch
a. Customize the theme → open a Product page.
b. Click the Variant picker block.
c. Turn the Swatches toggle ON → Save.
Note: if you dont get it, paste this reply in the shopify’s ai in the admin dashboard, it will help you set it up (it can also help revert the changes if you dont like it)
Note: as @tim_tairli says “use proper theme id – the long number – it’s uniq per store”.