Updated on 2024-03-04 GMT+08:00

Adaptive Orientation

You can use the GUI, code, or APIs to use adaptive orientation.

Images shot by camera or cellphone may contain Exif Information, such as orientation parameters like Orientation. When shooting, the rotation information is recorded in the orientation parameters. The browser can auto-orient the image to the right position.

When you set the adaptive orientation, images that contain orientation parameters will be oriented automatically according to these parameters. For details, see Table 1.

Operation name: auto-orient

Table 1 Adaptive orientation description

Parameter

Value Description

Code Example

value

The value can be 0 or 1. It is set to 1 by default.

0: Not set the adaptive orientation. The image will not rotate automatically and will keep the default orientation.

1: Set the adaptive orientation. The image will rotate automatically before resizing.

image/resize,w_100/auto-orient,0

  • The auto-orient operation is set only when both the height and width are shorter than 4096.
  • If the Exif information does not contain rotation parameters, or if there is even no Exif information, then the auto-orient parameter is invalid and will cause no effect to the image.

Example