Rotate images

更新时间: 2026-04-01 02:40:22

CDN's image editing feature supports two rotation modes: automatic rotation based on image orientation metadata, and manual rotation to a fixed clockwise angle. Use automatic rotation to correct camera-shot images with embedded orientation data; use manual rotation when you need a specific angle regardless of orientation metadata.

Note

The image editing feature of Alibaba Cloud CDN, the image editing feature of DCDN, and the Image Processing (IMG) feature of Object Storage Service (OSS) are three separate features. Image editing is free of charge until further notice.

Important

When you use the image editing feature, format conversions (for example, JPEG to WebP, JPEG to PNG, or PNG to WebP) may produce larger files because different image formats use different compression algorithms. To reduce file size after a format conversion, set the quality parameter to lower the image quality.

Automatic rotation

Automatic rotation reads the orientation property from the source image and rotates it to the correct orientation. This applies only to images that contain an orientation property, such as photos taken by cameras that embed orientation metadata. Images without this property are not rotated.

You must explicitly enable this feature before use. For setup instructions, see Enable and use image editing.

Important

After you enable automatic conversion to WebP, the cache hit ratio decreases temporarily and recovers automatically after a short period. Do not enable this feature during peak hours.

Action: auto-orient

Example:

example.com/image01.png?image_process=auto-orient

Manual rotation

Manual rotation rotates the source image clockwise by a fixed angle. Use this when you need a specific orientation regardless of whether the image contains orientation metadata.

Action: rotate

Supported values:

ValueEffect
90Rotate 90° clockwise
180Rotate 180° clockwise
270Rotate 270° clockwise

Example:

Rotate the source image 180° clockwise:

http(s)://example.com/image01.png?image_process=rotate,180
上一篇: Resize images 下一篇: Change the color of an image
阿里云首页 CDN 相关技术圈