`productCreateMedia` unable to create PNG media from URL

It seems that certain PNG images are failing to upload and attach to an image when using the productCreateMedia mutation (API version 2025-10). Here is an example:

mutation productCreateMedia($media: [CreateMediaInput!]!, $productId: ID!) {
  productCreateMedia(media: $media, productId: $productId) {
    media {
        id
        __typename
        ... on MediaImage {
            id
            fileErrors {
                code
                details
            }
            fileStatus
        }
    }
    mediaUserErrors {
        code
        field
        message
    }
  }
}

With the following inputs:

{
    "media": [
        {
            "alt": "",
            "mediaContentType": "IMAGE",
            "originalSource": "https://cdn.shopify.com/s/files/1/0085/7548/4009/files/O_dc930910-51da-432d-b534-1388c206116f.png?v=1760471310"
        }
    ],
    "productId": "gid://shopify/Product/8667477049396"
}

The mutation succeeds, but when I check the product media via a separate graphql query, I see the following media fileErrors:

{
    "data": {
        "product": {
            "id": "gid://shopify/Product/8667477049396",
            "media": {
                "edges": [
                    {
                        "node": {
                            "__typename": "MediaImage",
                            "id": "gid://shopify/MediaImage/27406789771316",
                            "image": null,
                            "fileErrors": [
                                {
                                    "code": "IMAGE_DOWNLOAD_FAILURE",
                                    "details": "Could not download image: \"https://cdn.shopify.com/s/files/1/0085/7548/4009/files/O_dc930910-51da-432d-b534-1388c206116f.png?v=1760471310\""
                                }
                            ]
                        }
                    }
                ]
            }
        }
    }
}

If helpful, the x-request-id response header for the productCreateMedia mutation is b813b2be-d5ec-4c11-be6f-e76b4cdbbfde-1760472625

Strangely, this error seems to be happening intermittently. Occasionally it works with the exact same request input.

The error message when viewing the product within the Shopify Admin is:

Media upload failed

Image: Media failed to process because the image could not be downloaded

The image is easily accessible via browser and is only ~220 KB in size. I suspect this is a bug within Shopify’s API, but wanted to mention it here in case it’s not on the team’s radar.

Eric

I found the issue. Inspecting the image in Chrome gave me a false indication of the actual image file size. Using the following curl request, I was able to confirm that the size of the image is too large:

âžś  ~ curl -sI "https://cdn.shopify.com/s/files/1/0085/7548/4009/files/O_dc930910-51da-432d-b534-1388c206116f.png?v=1760471310"
HTTP/2 200
date: Tue, 14 Oct 2025 20:44:45 GMT
content-type: image/png
content-length: 3688960

The image in this case is 3.6 MB. Too large for uploading via URL.

I will leave this thread here in case someone else is misled by misleading image file sizes when they are rendered in the browser.

As I continue to research, it seems that 3.6 MB is still well within the acceptable limits for a Shopify image upload.

Why is this image failing to upload?

1 Like

Hi @Eric_Froese,

I’ve looked into this with the X-Request-Id provided, and it looks like the Image Object creation was successful, but the actual image download afterwards timed out and failed to download the image.

Additionally the productCreateMedia mutation is now deprecated, and we recommend using either the productUpdate or productSet mutations to add new Media Files to a Product

If I can ask you to please retry this with the productUpdate or productSet mutations, passing the media you’re adding in the productUpdate.media or productSet.input. files input arguments. And if the error still occurs, please do reach out to our Shopify Support Team via the Shopify Help Center, and we can look into this further with our developers internally.

Hi @Kellan-Shopify,

Thank you for your attention to this matter. I’ve retried the media creation with the productUpdatemutation as you recommended, with the 2025-10 API version, and got the same result. Here is an example of the request which I am performing:

mutation productUpdate($product: ProductUpdateInput!, $media: [CreateMediaInput!]!) {
  productUpdate(product: $product, media: $media) {
    product {
      media(first: 250) {
        nodes {
          __typename
          ... on MediaImage {
              id
          }
        }
      }
    }
    userErrors {
        field
        message
    }
  }
}

With the following inputs:

{
  "media": [
    {
      "alt": "test",
      "mediaContentType": "IMAGE",
      "originalSource": "https://cdn.shopify.com/s/files/1/0085/7548/4009/files/O_a11c2e87-9ab6-4d76-8477-15b18cc4baa2.png?v=1762976660"
    }
  ],
  "product": {
    "id": "gid://shopify/Product/8692060684340"
  }
}

Once again, the mutation succeeds and returns:

{
  "data": {
    "productUpdate": {
      "product": {
        "media": {
          "nodes": [
            {
              "__typename": "MediaImage",
              "id": "gid://shopify/MediaImage/27589915639860" // This is an image that already exists on the product.
            },
            {
              "__typename": "MediaImage",
              "id": "gid://shopify/MediaImage/27589966037044"
            }
          ]
        }
      },
      "userErrors": []
    }
  }
}

However, when viewing the image data after the fact, I see the same error associated with the new image:

{
  "fileErrors": [
    {
      "code": "IMAGE_DOWNLOAD_FAILURE",
      "details": "Could not download image: \"https://cdn.shopify.com/s/files/1/0085/7548/4009/files/O_a11c2e87-9ab6-4d76-8477-15b18cc4baa2.png?v=1762976660\""
    }
  ]
}

The x-request-id response header for the productUpdate mutation is 385bb91b-6796-4f00-9ca6-8053684b2c2c-1762976668

It seems this issue is still present with the productUpdate.media input. One thing worth noting is that my application is designed for syncing product information. 5 seconds after the image being added to a product, the application will perform this mutation above to copy the newly added images to the other matching products. Perhaps the original image which is being copied is “too new” and therefore is not ready to be downloaded into the other store? I’ve also tried with a delay of 2 minutes to allow any image processing to complete, but the problem still ocurrs. This only seems to be an issue with PNG file types.

Do you have any other workarounds which I might try?

Hi @Eric_Froese,

Thanks for providing the new example, confirming the same behaviour is occurring with the productUpdate mutation as well.

Looking at this example, it is the same error occurring, with the actual image download timing out.

I do understand that you have reached out to our Support Team via the Shopify Help Center already, and I’ve been in contact with the Support Advisor you were discussing this with, and helped point them to ensure that the ticket gets escalated to the correct team to help investigate this behaviour further.

Moving forward since the behaviour is a platform issue with the image downloading, not an issue with the API calls themselves, it would be best to continue support for this via the ticket that you created with our Support Team earlier today.