Hi. We use our api to create shopify products with images - https://shopify.dev/docs/admin-api/rest/reference/products/product#create-2021-04 and we noticed that sometimes, when we set images with src in request body, we don't recieve all of them in response from shopify.
I.e. we create product with 5 images and we get only 4 created images in response. Why it may happen ?
Can you clarify if the images are only missing from the response, or do they also fail to get attached to the product?
The most common reason for image uploads to fail is when our system is unable to download the images in a timely manner. If you provide a product_id and rough timeframe from when you made the call, we can look further in the logs.
For that product it looks like the API call included 2 images, and both were attached successfully. Do you know what was included in the response for this call? If you haven't already, I suggest adding some kind of validation that compares the number of images in the request and response, and logs any differences. But from what I can see this call worked as expected.
Side note, it looks like your app isn't including an API version in the endpoint URL. It's highly recommended to include the version so you can avoid any breaking behaviours when features are deprecated.
Hi @_JB I added more logs. We caught it again (May 11, 2021 11:18:55 AM UTC)
So I see that we try to create a product that has 1 image (id=null, attachment = image in base64, position = 1, src=null)
And in response I see that images are empty array (product id 6773344698527)
Also I see that user creates >30 products one by one at that moment. (maybe it will be usefull for you)
I'm seeing this error in our logs
Failed to generate extension because: Could not determine content type of provided image. Could not generate an image extension name. Can you confirm if the same call works if you retry or send it manually with an http client like Postman or Insomnia?