Skip to content

Commit 3784ab9

Browse files
committed
Add orientation field to dimensions info option docs
1 parent 9f806b6 commit 3784ab9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/usage/getting_info.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ dimensions:%dimensions
9191
d:%dimensions
9292
```
9393

94-
When set to `1`, `t`, or `true`, imgproxy will return the image dimensions.
94+
When set to `1`, `t`, or `true`, imgproxy will return the image dimensions and orientation.
9595

9696
Default: `true`.
9797

@@ -100,10 +100,17 @@ Default: `true`.
100100
```json
101101
{
102102
"width": 7360,
103-
"height": 4912
103+
"height": 4912,
104+
"orientation": 1
104105
}
105106
```
106107

108+
:::info
109+
The `width` and `height` fields already account for orientation. For example, if the image has a width of `4000`, a height of `3000`, and an orientation of `6` (which means the image should be rotated 90 degrees clockwise), imgproxy will return `"width": 3000` and `"height": 4000`.
110+
111+
The `orientation` field contains the EXIF orientation value (from `1` to `8`). If the image doesn't have EXIF orientation data, imgproxy will return `1`.
112+
:::
113+
107114
### EXIF
108115

109116
```imgproxy_url_option

0 commit comments

Comments
 (0)