Skip to content

Commit

Permalink
fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxetom committed Jan 20, 2025
1 parent f1d1bad commit 57b2e31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/3.0/api/crop.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ You can also set where the image is cropped by adding a crop position. Accepts `
In addition to the crop position, you can be more specific about the exact crop position using a focal point. This is defined using two offset percentages: `crop-x%-y%`.

~~~ html
<img src="kayaks.jpg?w=300&h=300&fit=cover-25-75">
<img src="kayaks.jpg?w=300&h=300&fit=crop-25-75">
~~~

You may also choose to zoom into your focal point by providing a third value: a float between 1 and 100. Each full step is the equivalent of a 100% zoom. (eg. `x%-y%-2` is the equivalent of viewing the image at 200%). The suggested range is 1-10.

~~~ html
<img src="kayaks.jpg?w=300&h=300&fit=cover-25-75-2">
<img src="kayaks.jpg?w=300&h=300&fit=crop-25-75-2">
~~~

## Crop `crop`
Expand Down
1 change: 1 addition & 0 deletions docs/3.0/api/size.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Sets how the image is fitted to its target dimensions.
- `fill-max`: Resizes the image to fit within the width and height boundaries without cropping but upscaling the image if it's smaller. The finished image will have remaining space on either width or height (except if the aspect ratio of the new image is the same as the old image). The remaining space will be filled with the background color. The resulting image will match the constraining dimensions.
- `stretch`: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image.
- `cover`: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the [crop](api/crop/) page for more information.
- `crop`: Resizes the image to fill the width and height boundaries and crops any excess image data. (alias for `cover`).
- `crop-x%-y%`: Resizes the image to fill the width and height boundaries and crops based on a focal point defined by `x%` (left offset) and `y%` (top offset). The resulting image will match the width and height constraints without distorting the image. See the [crop](api/crop/) page for more information.

~~~ html
Expand Down

0 comments on commit 57b2e31

Please sign in to comment.