Problem description
The upload callback fails to obtain image information. When imageInfo.height, imageInfo.width, or imageInfo.format is specified in the callbackBody field of the upload callback, OSS cannot return image information because it fails to access the uploaded object.
Causes
Image information request parameters are specified in the callbackBody field of the upload callback, but OSS cannot retrieve the information because it cannot access the object. Common causes include:
The image was not uploaded successfully.
The image was deleted after upload by a lifecycle rule or another user.
The image format is not supported for image information queries. OSS supports the following formats: JPG, PNG, BMP, GIF, WebP, TIFF, and HEIC.
Examples
The imageInfo.height, imageInfo.width, or imageInfo.format parameter is specified in the callbackBody field when uploading an image, but image information is not returned after the upload completes.
Solutions
Before investigating the specific causes below, run a quick test to determine whether the problem is with the image or your OSS configuration:
Use
x-oss-process=image/infoto request image information directly:https://<your-bucket>.<endpoint>/<object-key>?x-oss-process=image/infoIf the direct request fails, test with a known-good image:
https://image-demo.oss-cn-hangzhou.aliyuncs.com/f.jpgIf the known-good image returns information: the problem is with your image. Check the supported formats and the causes below.
If the known-good image also fails: the problem is with your OSS access configuration.
Based on the diagnosis, apply the appropriate solution:
The image was not uploaded successfully: Check whether the object exists in the bucket. If it does not, call PutObject to upload the image again.
The image was deleted after upload: Check whether a lifecycle rule or another user deleted the object. Review your bucket's lifecycle rules and access logs to confirm.
The image format is not supported: Verify that the image is one of the supported formats (JPG, PNG, BMP, GIF, WebP, TIFF, HEIC). If not, convert the image to a supported format before uploading.