You can use the auto-orient parameter to specify whether source images stored in Object Storage Service (OSS) are rotated based on auto-rotate configurations. This topic describes the parameters and examples to rotate images when you configure auto-rotate.


Operation name: auto-orient

The following table describes the parameters that you can configure when you configure auto-rotate.

Parameter Description Example
[value] Specifies whether to perform auto-rotate. 0 and 1. Default value: 1.
  • 0: The orientation of the source image is retained.
  • 1: OSS performs auto-rotate on the image.

Usage notes

  • If the source image does not have rotation parameters, the operation that you perform to set the auto-orient parameter does not affect the image.
  • Most tools can be used to perform auto-rotate on images that have rotation parameters. Therefore, the images you view may be automatically rotated.
  • Images that are processed by using auto-orient are re-compressed, which results in size differences between the processed images and the source images.


An image in the bucket named image-demo in the China (Hangzhou) region is used in this example. The following URL is used to access the image over the Internet: