All Products
Search
Document Center

Object Storage Service:"The image file may be damaged" error occurs when accessing images uploaded to OSS

Last Updated:Mar 20, 2026

When you use the image processing feature of OSS to access an uploaded image, OSS returns the following error:

<Code>ImageDamage</Code>
<Message>The image file may be damaged.</Message>

This error means the image processing service (IMG) cannot decode the image — the file is partially lost or damaged.

If an output similar to the following is returned, one of the solutions below is applicable to your system kernel version:

Troubleshooting

Start by downloading the image to check whether the file itself is damaged.

Can you open the image locally?

  • No — The image file is corrupted. Re-upload a valid image file. The error is unrelated to OSS image processing.

  • Yes — The file opens in a local image viewer but fails in OSS. Continue with the steps below.

Step 1: Validate the image with a local tool

Local image viewers often handle minor file corruption silently. OSS image processing does not apply the same tolerance, which is why the error appears only in OSS.

On Linux, use the convert tool to check whether the file is intact:

convert input.jpg output.jpg
  • No errors — The image is valid. Proceed to Step 2.

  • Errors reported — The original image file is damaged. Re-upload a valid copy.

Step 2: Check IMG limits

The error can also occur when the image exceeds the limits supported by OSS image processing. Check the IMG limits to confirm whether your image is within the supported range.

Step 3: Contact Alibaba Cloud technical support

If the issue persists, re-access the image, note the Request ID from the response, and provide it to Alibaba Cloud technical support for log analysis.

For instructions on retrieving the Request ID, see Obtain the request ID in OSS.

Applicable scope

  • OSS