- Media API
- Transformations
- Rotate
- autoOrientation
autoOrientation
The autoOrientation transformation automatically rotates images based on their EXIF orientation metadata. This is useful for ensuring images captured on mobile devices are displayed in the correct orientation, regardless of how the camera was held when the photo was taken.
Serving Content via CDN
The Media API is a CDN-based service that serves transformed images via GET requests. When you request a transformed image URL, the transformation is applied dynamically on the first request and then cached for subsequent requests.
URL Pattern
https://media.vyso.io/auto-orientation/ASSET_ID.jpgExamples
Basic Usage - Auto Orient by EXIF
curl -i GET https://media.vyso.io/auto-orientation/ASSET_ID.jpgAuto Orient with PNG Format
curl -i GET https://media.vyso.io/auto-orientation/ASSET_ID.pngAuto Orient with WebP Format
curl -i GET https://media.vyso.io/auto-orientation/ASSET_ID.webpOn the first request, you'll receive a X-Cache: MISS header while the transformation is applied and cached. Subsequent requests will return X-Cache: HIT.
Parameters
The autoOrientation transformation does not accept any parameters. It automatically uses the EXIF orientation metadata embedded in the image file to determine the correct rotation.
Response
The API returns the rotated image based on its EXIF orientation metadata. The response format depends on the format of the asset stored in the Vyso asset cloud.
Content-Type: Determined by the stored asset format (e.g., image/jpeg, image/png)