Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Preview | Syntax |
---|---|
Resize and crop to achieve the desired width and height
Crops the image to specified dimensions (width and height) while keeping proportions and delivers the resulting image via CDN.
func=crop
This is the default resizing mode when both width and height operations are used. You do not need to specify func=crop explicitly.
Specifies which part of the image you wish to keep while cropping. If you omit the gravity option, central cropping is performed.
gravity=X
Crop by boundary coordinates
Allows to crop an image by providing the cropping area. It is useful when you want to crop a specific part of the image. To set the coordinates of the crop rectangle, use the tl_px and br_px operations.
tl_px=X1,Y1
br_px=X2,Y2
Original image: /docs/kids.jpg
Positionable crop can be combined with all available resize functions - width/height, crop, fit, bound or cover. This operation is performed after the positionable crop.
Automatic focal point detection
Chooses the most important image features and objects and sets the focal point on them when cropping.
gravity=smart
gravity=auto
gravity=face
Sets the crop focal point on the people in the image or on the most prominent featues if no faces are detected. Useful for creating thumbnails from images with different aspect ratios.
If you prefer to use the legacy automatic crop, just set gravity operation to auto.
When using gravity=face, all images with one dominant face are focused on this face upon cropping. If there are many or no faces in the image, gravity falls back to auto.
If you would like to try and include multiple faces in the image, you can use gravity=smart
Crop operation which removes faces from the top of the image
Crops out the topmost part of an image if it contains a face.
To control the margin when cropping the face out, you can use the face_margin=Y operation where Y is a percentage of the face height. Its default value is 20. You can also use negative numbers if you would like to keep part of the face.
func=facehide
Crop operation focusing only on one face
Finds the most prominent face in the image and crops it to specified dimension provided with the width and height parameters. If you however provide only one dimension, the other dimension will be chosen automatically to keep the aspect ratio of the face.
func=face
If there is no face in the image or many faces are found, the operation defaults to a standard crop.
Sets margins around the face. You can set equal margins with face_margin=X or separate horizontal and vertical margins (face_margin=W,H).
face_margin=X|W,H
Resize with minimum size constraints (to fill a box)
Resizes an image while bounding the smaller dimension to the desired width or height while keeping proportions. Delivers the resulting image via CDN.
func=boundmin
Setting crop gravity with focal point coordinates
Allows to crop an image by defining the coordinates of the crop focal point. It is useful when you want to crop images where the coordinates of the point of interest are already known.
To set the coordinates of the focal point, use the gravity=X,Y operation where X and Y are the coordinates of the focal point (in pixels). Alternatively, you can set the coordinates as a percentage of the original image - gravity=Xp,Yp or gravity=xc,yc, where X,Y=0..100 and x,y=0..1.
gravity=X,Y
gravity=Xp,Yp|xc,yc
Original image: /docs/castle.jpg?w=1000
Please note that the focal point in gravity=X,Y has to be defined as coordinates X and Y of the full-sized origin image and not the scaled-down version.
Do not upscale an image if target size is larger than the origin image
Crop by aspect ratio or aspect ratio range
Sets target aspect ratio or aspect ratio range when cropping. Aspect ratios can be set as decimal values (1.778) or ratios (16:9).
aspect_ratio=AR | ar=AR
aspect_ratio=AR1,AR2 | ar=AR1,AR2
If you provide only one dimension parameter (width or height) and aspect_ratio, the other dimension will be calcualted. If you include both width and height in the URL, aspect_ratio is ignored.
If you provide only aspect_ratio and no dimensions (width or height), the image will be cropped without resizing.
You can spcify a range of aspect ratio, for example aspect_ratio=4:3,16:9. Images which fall within this range, will not be cropped. Useful to avoid very wide ot very tall images by cropping them to the closest aspect ratio.
Resize ignoring proportions
Fits the image in a box with padding when needed
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|
Preview | Syntax |
---|
Resizes to a given width and height box and keeps proportions. Similar to but without adding padding. Delivers the resulting image via CDN.
Preview | Syntax |
---|
Preview | Syntax |
---|
Operation | Syntax | Description |
---|
Preview | Syntax |
---|
Preview | Syntax |
---|
Performs either or operation depending on the origin image and the desired transformation dimensions.
Preview | Syntax |
---|
If you include the operation in the URL, the image will be trimmed first (if possible) and then either cropped or fitted to the desired size.
Preview | Syntax |
---|