`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?