The Shopify store behaves as follows:
-
You upload a SINGLE (1) image for each variant
-
You upload additional images at the product level (eg: 3)
When you navigate to a product and select a variant you see your image and the other 3 general ones but NOT the images for other variants
There is no way to replicate this behaviour by using the Storefront API because it returns ALL the images at the product level, for all variants and only the image for the variant at the variant level.
We wrote a piece of code that filters out images from other variants by comparing the urls… but we shouldn’t have to.