Hi Team, I followed the page(Manage media for products) to upload the image with GraphQL API. But I have a problem if I need to link the uploaded image to the product variant as a featured variant image, shopify will throw an error because the image is not in Ready status. This is the details:
- Use the stagedUploadsCreate mutation to generate the values for uploading the image.
- Use a multipart form to upload the image with all parameters in the step 1.
- Add the uploaded image link to the product by using the productCreateMedia mutation, Shopify returns a success status.
- If the image is a featured image for a variant, I use productVariantAppendMedia mutation to link the image to the variant, the problem is here. If the image is not in the Ready status, shopify will return an error. But I don’t know when the image will become Ready status, I have to query the image again and again until its status changes to Ready, this causes a performance issue when we need to upload a batch of images.
I checked the documentation from Shopify help but I cannot find a solution, I want to understand:
- How long will the image status change to Ready?
- Why I can use productCreateMedia mutation without checking image status, but productVariantAppendMedia mutation need to check image status?
Shopify team help me to figure out how to fix this problem?