I am using the Shopify GraphQL Product API to create and update products with media (main image). The API does not return any errors in the response or headers and always responds successfully. However, I am repeatedly facing an issue where the product image is not being updated.
On the product page in the Shopify admin, it shows the following message:
“Thumbnail failed to upload for ‘easy-donation-logo_f789295b-4dd0-4800-b1ba-99becd1bce62.jpg’, please retry again.”
Please refer to the attached image for reference.
I understand that this issue could be related to the image size, format, or filename. However, since the API response indicates success and does not return any error, this becomes a runtime issue that is difficult to detect programmatically.
I kindly request the Shopify team to please investigate this issue and, if possible, return a proper error response through the API when the media upload fails.
Thank you.
Hey @Ajay_Rabari - this is likely due to the source image becoming unavailable before Shopify finishes processing it in the background. The mutation returns success immediately, but thumbnail generation is async, so if the source URL expires or gets deleted before that completes, you get “Thumbnail failed to upload” with no API-level error.
This same issue was discussed here - the fix is to poll fileStatus on the media until it reaches READY or FAILED before removing the source file. This also gives you the programmatic error detection you’re looking for.
If you’re already doing that and still seeing failures, can you share an x-request-id from one of the failing upload requests? I can check our logs to see what’s happening on our side.
1 Like
Thank you @Donal-Shopify for your response and help.
Yes, we found that the image source was not stable and was sometimes returning a 404 error. Thank you for your help. I will look into this further.
1 Like