Skip to content

Commit 3f981e7

Browse files
authored
Added flip parameter to Images (#20691)
1 parent be5a5ce commit 3f981e7

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

src/content/docs/images/transform-images/transform-via-url.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ You must specify at least one option. Options are comma-separated (spaces are no
7979

8080
<Render file="fit" />
8181

82+
### `flip`
83+
84+
<Render file="flip" />
85+
8286
### `format`
8387

8488
<Render file="format" />

src/content/docs/images/transform-images/transform-via-workers.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ The `fetch()` function accepts parameters in the second argument inside the `{cf
6666

6767
<Render file="fit" />
6868

69+
### `flip`
70+
71+
<Render file="flip" />
72+
6973
### `format`
7074

7175
<Render file="format" />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
{}
3+
---
4+
import { Tabs, TabItem } from "~/components"
5+
6+
Flips the image horizontally, vertically, or both. Can be used with the `rotate` parameter to set the orientation of an image.
7+
8+
Flipping is performed before rotation. For example, if you apply `flip=h,rotate=90,` then the image will be flipped horizontally, then rotated by 90 degrees.
9+
10+
Available options are:
11+
12+
- `h`: Flips the image horizontally.
13+
- `v`: Flips the image vertically.
14+
- `hv`: Flips the image vertically and horizontally.
15+
16+
<Tabs>
17+
<TabItem label="URL format">
18+
```js
19+
flip=h
20+
```
21+
</TabItem>
22+
<TabItem label="Workers">
23+
```js
24+
cf: {image: {flip: "h"}}
25+
```
26+
</TabItem>
27+
</Tabs>

0 commit comments

Comments
 (0)