Default image attributes
The Algolia Shopify app indexes product variants as individual records.
Each record contains:
-
image– the image associated with that specific variant. -
product_image– the primary (first) image from the parent product.
You can see the default Shopify product variant schema here:
https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/schemas
Indexing additional images with metafields
If you'd like to index additional images, they can be added as Shopify metafields.
Choosing a metafield type
There are two common approaches:
- Text metafields containing image URLs are indexed as provided.
-
Shopify
file_referencemetafields (including image metafields) store their value as a reference to a Shopify file (for example, aMediaImage) rather than the underlying CDN image URL. As a result, Algolia indexes the raw metafield value returned by Shopify, which for image metafields is a Shopify resource GID.
If your application requires the resolved CDN image URL when using file_reference metafields, additional implementation is required to resolve the Shopify reference during indexing (for example, using Data Transformations with Fetch or another custom enrichment process).
Displaying additional images
Indexing additional images only makes them available in your Algolia records. If you'd like to display those images on your storefront, you'll also need to customize your InstantSearch implementation to use the indexed attribute.
For more information, see: