> ## Documentation Index
> Fetch the complete documentation index at: https://autorender.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate

> Rotate images by any angle, or auto-orient them from EXIF data, using the r_ parameter.

Rotate an image around its center with the `r_` parameter. Pass an angle in degrees, or use `r_auto`, `r_portrait`, or `r_landscape` to orient the image automatically.

> [!NOTE]
>
> Angles are normalized to the **0°–360°** range, so `r_450` is treated as `r_90`. Positive values rotate clockwise; negative values rotate counter-clockwise.

## How does it work?

You add `r_{degrees}` to the transform segment. Autorender rotates the image around its center point and expands the canvas to fit the rotated result. Transparency is preserved for formats that support it, such as PNG and WebP.

> [tab] Original (r\_0)
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360/doc1/flight.jpg
> ```
>
> ![Original image](https://assets.autorender.io/LOKVTtKVGb/w_360/doc1/flight.jpg)

> [tab] Rotate 90°
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360,r_90/doc1/flight.jpg
> ```
>
> ![Rotated 90 degrees](https://assets.autorender.io/LOKVTtKVGb/w_360,r_90/doc1/flight.jpg)

> [tab] Rotate 180°
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360,r_180/doc1/flight.jpg
> ```
>
> ![Rotated 180 degrees](https://assets.autorender.io/LOKVTtKVGb/w_360,r_180/doc1/flight.jpg)

> [tab] Rotate 270°
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360,r_270/doc1/flight.jpg
> ```
>
> ![Rotated 270 degrees](https://assets.autorender.io/LOKVTtKVGb/w_360,r_270/doc1/flight.jpg)

| Value | Description |
| - | - |
| `90` | Quarter turn clockwise (portrait to landscape) |
| `180` | Half turn (upside down) |
| `270` | Three-quarter turn clockwise |
| `auto` | Corrects orientation from the image's EXIF data |
| `portrait` | Rotates to a vertical orientation |
| `landscape` | Rotates to a horizontal orientation |

## How to auto-orient an image?

`r_portrait` and `r_landscape` force a target orientation regardless of how the photo was captured, which keeps galleries and product grids consistent. Autorender reads the image dimensions and applies the rotation needed (`90°`, `270°`, or `0°`) while preserving the original aspect ratio.

> [tab] Original
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360/doc1/coffee_cup.jpg
> ```
>
> ![Original image](https://assets.autorender.io/LOKVTtKVGb/w_360/doc1/coffee_cup.jpg)

> [tab] Force portrait (r\_portrait)
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360,r_portrait/doc1/coffee_cup.jpg
> ```
>
> ![Portrait rotation](https://assets.autorender.io/LOKVTtKVGb/w_360,r_portrait/doc1/coffee_cup.jpg)

> [tab] Force landscape (r\_landscape)
>
> ```text theme={null}
> https://assets.autorender.io/LOKVTtKVGb/w_360,r_landscape/doc1/coffee_cup.jpg
> ```
>
> ![Landscape rotation](https://assets.autorender.io/LOKVTtKVGb/w_360,r_landscape/doc1/coffee_cup.jpg)

## How to combine rotation with other transforms?

* Apply rotation before cropping so the crop acts on the rotated frame; for exact output dimensions, pair `r_` with `c_crop` or `c_fill`.
* Autorender preserves transparency when rotating PNG and WebP images, so rotated logos keep clean edges.

## Next steps

> [card] [Flip](https://autorender.io/docs/transformations/flip.md)
>
> Mirror an image horizontally or vertically with `flip_`.

> [card] [Crop](https://autorender.io/docs/transformations/crop.md)
>
> Fix output dimensions after rotation with a crop mode.

> [card] [Resize and aspect ratio](https://autorender.io/docs/transformations/resize-and-aspect-ratio.md)
>
> Set the width and height the rotated image renders at.

> [card] [Recipes](https://autorender.io/docs/transformations/recipes.md)
>
> Save rotation combinations as reusable `t_` tokens.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.