Shopify product images that change with the variant
Liquid+ sell one product in two flavours, and the two do not look the same. Different pouch, different colour language, different nutrition panel. The product page needed to swap a set of images when someone picked a flavour, not just the single hero shot, and the team needed to manage that themselves as more images arrive.
What we did
Shopify lets you attach one featured image to a variant, and that is where it stops. A whole gallery per variant is not something the platform offers, and hard coding the image list into the theme would have meant a developer every time a photo changed.
So we built it as a rule the gallery understands. Any image in the product’s media whose description ends with a tag naming a flavour only renders when that flavour is selected, and anything untagged shows for both. Which means the shared lifestyle shots stay shared, the pouch shots and the nutrition panels follow their own flavour, and deciding which is which is a text edit in the media library rather than a change to the theme.
The result
The gallery swaps with the picker, and the people who own the photography own the rule. A third flavour, or a new set of shots for an existing one, needs somebody to upload the images and tag them, and no code at all.
What to take from it
When a platform gives you one of something and you need many, the useful question is not how to hack the limit, it is where the decision should live once you have. Building it as a convention the content team can drive means the capability outlives the build. Hard coding it means the second and third version of the same request come back to a developer, every time, forever.