Image operations
Basic image resizing operations
Resizing operations enable the dynamic generation of image transformations to meet various web delivery use cases. Operations focus on the image size while Image filters allow to modify the image itself.
Operation | Syntax | Description |
---|---|---|
width=X | sets the image width to X pixels | |
height=X | sets the image height to X pixels | |
org_if_sml=1 | prevents resizing if the target size is larger than the origin image | |
func=crop | behaviorsets crop resize function | |
| gravity=X | defines the part of the image to be retained when cropping
X = [north | south][east | west] | auto | X,Y |
tl_px=X,Y | sets coordinates of the top left corner of the cropping rectangle | |
| br_px=X,Y | sets coordinates of the bottom right corner of the cropping rectangle |
func=face | crops the image automatically focusing on the most prominent face | |
func=fit | sets fit resize function | |
func=cropfit | sets crop or fit resize function depending on the origin and the desired dimensions | |
func=bound | sets bound resize function | |
func=boundmin | bounds the image to the larger dimension | |
func=cover | sets cover resize function (distorts image proportions) | |
flip=[h][v] | mirrors the image horizontally and/or vertically | |
r=X | rotates the image to X degrees (counterclockwise) | |
trim=X | trims any solid-color border (if present); X is the aggressiveness of the operation | |
radius=X | applies rounded corners and optionally fills the empty background with a color |
When you specify both width and height, original image proportions can be either ignored or maintained. Also, you may choose to add padding to the image to fill the blank space.
Cloudimage supports the following resize function (operation func):
This resizing function removes parts of the image and is the default behavior when both width and height are defined. Read further for other resizing functions.
Preview | Syntax |
---|---|
![]() |
Resizes the image keeping proportions and adding padding to satisfy the desired dimensions; see Fit
Preview | Syntax |
---|---|
![]() |
This resizing function may remove parts of the image.
Preview | Syntax |
---|---|
![]() | |
![]() |
Preview | Syntax |
---|---|
![]() |
The boundmin operation is a special case of bound where the smaller dimension is respected instead of the larger one, see Boundmin
Resizes the image to the given width and height ignoring original image proportions, thus distorting the image; see Cover
Preview | Syntax |
---|---|
![]() |
For troubleshooting purposes, use the ci_info=1 operation to view details about resizing and compression, for example /sample.li/hotel.jpg?w=400&ci_info=1
Last modified 1mo ago