Uploading product images to multiple products in productCreateMedia

Solved
arjun_rajkumar
Excursionist
24 1 0

hey, 

I am following the official tutorial and I have managed to upload multiple images to ONE product. 

 

{ "id": "gid://shopify/Product/1", "media": [ { "originalSource": "https://storage.googleapis.com/imageurl..", "mediaContentType": "IMAGE" } ] }

Just wondering if using the same productCreateMedia mutation, we can upload images to multiple products in one go?

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
293 36 47

This is an accepted solution.

Hey @arjun_rajkumar 

It looks like that specific mutation requires a singular product ID. I am not aware of a single API call that you can make that will upload an image file to multiple products. 

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog