I am trying to upload images for a few thousand products via API.
All images are in the PNG format.
Most of the images (99.9%) are uploaded without problems. But a few images return this error:
422/Unprocessable Entity The uploaded image is corrupt and cannot be processed. Please try a different image.
It does not depend on the size, I get this errors with images with different sizes and larger images are uploaded correctly. The same images give this error again and again.
I use POST with only `filename` and `attachment` field.
Here are xRequestIds for a few recent failed requests:
Can you look in your log and find the problem, please?
Thanks for the information. The error I am seeing is that the image failed due to: Could not determine dimensions. Please review our documentation here for more advice on image sizing: https://help.shopify.com/en/manual/products/product-variant-images
It looks like the failed images have bigger height than is allowed.
It would be good (I would say necessary for API users) to have more correct and meaningful error messages in the API error responses. The message "The uploaded image is corrupt and cannot be processed" is absolutely misleading. The image is OK, but your API just refuses to process it because one of the possible reasons. This case it is a too big image height. In other cases it can be a too big width or too big image size.
The message "Could not determine dimensions" is not very clear. Why not "Your image height XXXX is greater than the allowed height YYY".
Developers need detailed error information. It is not difficult to implement, is it?
I agree with konst.
It's an equivalent of Windows "Something Happened" error. It's useless, and very annoying to work with when I have to spend 2 hours of my life due to lazy coding of a platform I pay for.
Honestly, fair assessment. I'll talk to the team.