liquid icon indicating copy to clipboard operation
liquid copied to clipboard

`product.images` missing variant data beyond 250th variant

Open nikitaourazbaev opened this issue 3 months ago • 2 comments

image.attached_to_variant? returns false and image.variants is empty if the image is attached to a variant that is not in the first 250 variants.

image_attached_to_250th_variant.attached_to_variant? # true
image_attached_to_251st_variant.attached_to_variant? # false

nikitaourazbaev avatar Sep 08 '25 12:09 nikitaourazbaev

attached_to_variant is more or less deprecated in Shopify. You must now use the product.media (which return all kind of media), and media does not have attached_to_variant. I don't expect any improvement to be done on product.image

bakura10 avatar Nov 01 '25 06:11 bakura10

attached_to_variant is more or less deprecated in Shopify. You must now use the product.media (which return all kind of media), and media does not have attached_to_variant. I don't expect any improvement to be done on product.image

Yes, unfortunately the issue with product.media is that array filters are post-pagination, so that approach doesn’t work either in this case, cf. https://github.com/Shopify/liquid/issues/1941#issuecomment-3266241156

nikitaourazbaev avatar Nov 03 '25 13:11 nikitaourazbaev