A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi everyone, I am Ban from Comestri.
Currently my company is having an issue when updating some product images using GraphQL. For these images, Shopify returns the error:
[path to image] is not a valid image file type
For example:
product-images/2204512005-FOG-2.jpg?a7ccc098ab844aa5d965ace08958747d is not a valid image file type
This looks like an issue on Shopify's end, as the uploaded images do not seem to be corrupted, can be viewed normally, and are of dimensions and file sizes below Shopify's specified limits.
I managed to reproduce this issue by following these steps:
If I remove the
?a7ccc098ab844aa5d965ace08958747d
part from the url then I get a different error:
The uploaded image is corrupt and cannot be processed. Please try a different image.
Here is the mutation I used to reproduce the bug:
mutation productImageUpdate($image: ImageInput!, $productId: ID!) {
productImageUpdate(image: $image, productId: $productId) {
image {
id
}
userErrors {
field
message
}
}
}
{
"productId": "gid://shopify/Product/6840624316497",
"image": {
"id": "gid://shopify/ProductImage/29890445869137",
"src": "https://fine-day.s3.ap-southeast-2.amazonaws.com/product-images/2204512005-FOG-2.jpg?a7ccc098ab844aa5d965ace08958747d"
}
}
Have you encountered a similar issue before? How did you resolve it? Thanks!
Hi @Comestri
Thanks for taking the time to document this and create a post. At this time we are unable to provide authenticated support through these forums. In this case, that would limit our ability to dig into this further.If you can document a new example, outlining the process and requests you are using, as well as x-request-id headers values returned, please feel free to use our [Report an issue]()https://help.shopify.com/en/questions/partners#/contact) form.
If you do not have a partner account at this time please feel free to connect with Shopify Support with the above information.
KB77 | API 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