Updated on 2024-08-09 GMT+08:00

Adaptive Orientation

You can use the GUI or code mode on OBS Console or make an API call to use adaptive orientation.

Images shot by cameras or smartphones may contain EXIF Data, like an orientation parameter. Since an image's rotation information is recorded in the orientation parameter, a browser can automatically rotate the image to the right position based on the orientation parameter.

With adaptive orientation configured, images that contain the orientation parameter will be rotated automatically. For details, see Table 1.

This operation is represented by auto-orient.

Table 1 Adaptive orientation description

Parameter

Value Description

Code Example

value

The value can be 0 or 1 (default value).

0: Adaptive orientation is not configured. The image will not rotate automatically and will keep the default orientation.

1: Adaptive orientation is configured. The image will rotate automatically before being resized.

image/resize,w_100/auto-orient,0

  • The adaptive orientation can be configured only when the height and width of an image are both smaller than 4,096.
  • If an image's EXIF data does not contain any rotation parameters or the image has no EXIF data at all, the auto-orient parameter does not work for the image.

Example