Skip to content

Commit a128317

Browse files
committed
Specify as face-zoom
1 parent b158bd2 commit a128317

File tree

4 files changed

+11
-19
lines changed

4 files changed

+11
-19
lines changed

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

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

7676
<Render file="dpr" />
7777

78+
### `face-zoom`
79+
80+
<Render file="face-zoom" />
81+
7882
### `fit`
7983

8084
<Render file="fit" />
@@ -135,10 +139,6 @@ You must specify at least one option. Options are comma-separated (spaces are no
135139

136140
<Render file="width" />
137141

138-
### `zoom`
139-
140-
<Render file="zoom" />
141-
142142
## Recommended image sizes
143143

144144
Ideally, image sizes should match exactly the size they are displayed on the page. If the page contains thumbnails with markup such as `<img width="200" …>`, then images should be resized to `width=200`. If the exact size is not known ahead of time, use the [responsive images technique](/images/manage-images/create-variants/).

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

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

6363
<Render file="dpr" />
6464

65+
### `face-zoom`
66+
67+
<Render file="face-zoom" />
68+
6569
### `fit`
6670

6771
<Render file="fit" />
@@ -118,10 +122,6 @@ The `fetch()` function accepts parameters in the second argument inside the `{cf
118122

119123
<Render file="width" />
120124

121-
### `zoom`
122-
123-
<Render file="zoom" />
124-
125125
In your worker, where you would fetch the image using `fetch(request)`, add options like in the following example:
126126

127127
```js

src/content/partials/images/zoom.mdx renamed to src/content/partials/images/face-zoom.mdx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,12 @@ This controls the threshold for how much of the surrounding pixels around the fa
1111
<Tabs>
1212
<TabItem label="URL format">
1313
```js
14-
zoom=0.1
15-
```
16-
</TabItem>
17-
<TabItem label="URL format alias">
18-
```js
19-
zoom=0.2
20-
OR
21-
22-
face-zoom=0.2
14+
face-zoom=0.1
2315
```
2416
</TabItem>
2517
<TabItem label="Workers">
2618
```js
27-
cf: {image: {zoom: 0.5}}
19+
cf: {image: {face-zoom: 0.5}}
2820
```
2921
</TabItem>
3022
</Tabs>

src/content/partials/images/gravity.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You must subtract the height of the image before you calculate the focal point.
1919
:::
2020

2121
- `face`\
22-
Automatically sets the focal point based on detected faces in an image. This can be combined with the `zoom` parameter to specify how closely the image should be cropped towards the faces.
22+
Automatically sets the focal point based on detected faces in an image. This can be combined with the `face-zoom` parameter to specify how closely the image should be cropped towards the faces.
2323
The new focal point is determined by a minimum bounding box that surrounds all detected faces. If no faces are found, then the focal point will fall back to the center of the image.
2424

2525
<Tabs>

0 commit comments

Comments
 (0)