-
Notifications
You must be signed in to change notification settings - Fork 10k
Adding face cropping parameters to image transformation #23592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dochne
merged 6 commits into
cloudflare:production
from
deven96:face-crop-resizing-args
Jul 29, 2025
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3c3abd0
Adding face cropping parameters to image transformation
deven96 2a2d458
Fixing face cropping documentation
deven96 b158bd2
Merge updates from upstream
deven96 2ece5bc
Adding responsible AI to face cropping
deven96 a6555d3
Update src/content/partials/images/gravity.mdx
ToriLindsay ad816c4
Update src/content/docs/images/transform-images/transform-via-workers…
dochne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| {} | ||
| --- | ||
| import { Tabs, TabItem } from "~/components" | ||
|
|
||
| Specifies how closely the image is cropped toward the face when combined with the `gravity=face` option. | ||
| Valid range is from `0` (includes as much of the background as possible) to `1` (crops the image as closely to the face as possible), decimals allowed. The default is `0`. | ||
|
|
||
| This controls the threshold for how much of the surrounding pixels around the face will be included in the image and takes effect only if face(s) are detected in the image. | ||
|
|
||
| <Tabs> | ||
| <TabItem label="URL format"> | ||
| ```js | ||
| zoom=0.1 | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="URL format alias"> | ||
| ```js | ||
| zoom=0.2 | ||
| OR | ||
|
|
||
| face-zoom=0.2 | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Workers"> | ||
| ```js | ||
| cf: {image: {zoom: 0.5}} | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.