Rotate images
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.
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.
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.
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-orientManual 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:
| Value | Effect |
|---|---|
90 | Rotate 90° clockwise |
180 | Rotate 180° clockwise |
270 | Rotate 270° clockwise |
Example:
Rotate the source image 180° clockwise:
http(s)://example.com/image01.png?image_process=rotate,180