Bulk update product with variants and all images

Topic summary

  • Main issue: Bulk creation of multi-variant products via Shopify Admin GraphQL API (2024-01) using the productCreate mutation, with variant images not being created/linked. Single-variant products worked, and multi-variant products were created, but images did not attach.

  • Details: The payload included variants.imageSrc to assign images per variant. This field was visible in the UI but not clearly documented, leading to uncertainty about how to correctly attach variant images during creation. Screenshots and a JSON payload were referenced.

  • Resolution: The problem was resolved by supplying the correct media URL (i.e., a valid, accessible image URL). Once corrected, variant images were created/associated as expected. No API change or workaround was required.

  • Outcome/Status: Resolved. The root cause was an incorrect/invalid image URL in the request, not a limitation of the productCreate mutation. No open questions remain.

Summarized with AI on January 5. AI used: gpt-5.

Hi,

We are trying to import the products in bulk for sinlgle variant as well multile variant products in a single call using

https://shopify.dev/docs/api/admin-graphql/2024-01/mutations/productCreate

however we are able to create products with single variants. We are also able to create products with variants in bulk but the images are not being created.

Please check the attached screenshot we are providing image in variants[imageSrc]

we checked this field in the right side but not in the documentation

Can anyone guide us how we can create images of the variants while creating the multi variant products’’

Please find the Json which we are passing in the attachment.

Regards
Pankaj

Hi,

We could solve it. we just need to pass correct media URL

Regards
Pankaj