`product.images` missing variant data beyond 250th variant
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
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
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 onproduct.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