In a commerce store that I'm trying out, my product variants have a variant image field.
I need to get an array of all the variant images in my product template.
I know I can do something like
{% set variantImages = product.variants|map(variant => variant.variantImage.one() )}
but I believe this will execute a query for each variant.
I am aware of eager loading in craft, but I am not sure how to use it in this case, as I am not writing a query to get the product or variants - craft auto-injects those into the product template.
How would I eager load the assets of a variant from within the product template?