Why doesn't productAppendImages support WebP images in Shopify QL?

Solved

Why doesn't productAppendImages support WebP images in Shopify QL?

gwg
Shopify Partner
5 1 1

We are using Shopify QL to link our database of products to shopify. Our database includes images in various formats: PNG, JPEG and some WebP.

Everything works great except we cannot link our WebP images to shopify. We get this in response:

:"Could not download image: [\"/1/Product/Berserk-Volume-1_31a6f03b14cf434c988.webp is not a valid image file type.\"]

 
Currently using 2023-01, but I see no changes in that API since then. Also tested with 2024-01.  It seems to happen with all WebP, regardless of source, while images in PNG or JPEG work fine.

Is this a limitation of productAppendImages? Sending a query like:

 

 

 

mutation productAppendImages($input: ProductAppendImagesInput!) {
  productAppendImages(input: $input) {
    newImages {
        id
        url
    }
    userErrors {
        field
        message
    }
  }
}";

 

 

 


and the inputs are like:

 

 

 

   {
     "id": "gid://shopify/Product/PRODUCTID",
     "images": [
       { src: "https://xxxx/file.png" }
     ]
   }

 

 

 

Accepted Solution (1)

gwg
Shopify Partner
5 1 1

This is an accepted solution.

This turned out to be AWS. They don't have a mime type set by default for `webp` and shopify for whatever reason is relying on the mime type.

View solution in original post

Reply 1 (1)

gwg
Shopify Partner
5 1 1

This is an accepted solution.

This turned out to be AWS. They don't have a mime type set by default for `webp` and shopify for whatever reason is relying on the mime type.