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.
Available operations
gravity=X
defines the part of the image to be retained when cropping X = [north | south][east | west] | auto | X,Y
br_px=X,Y
sets coordinates of the bottom right corner of the cropping rectangle
func=cropfit
sets crop or fit resize function depending on the origin and the desired dimensions
radius=X
applies rounded corners and optionally fills the empty background with a color
Do not hesitate to contact us if you need any additional operations not listed above
Resize functions
When you specify width and height, original image proportions can be ignored or maintained. You may also choose to add padding to the image to fill the blank space.
Cloudimage supports the following resize function (operation func):
Crop
Keeps image proportions, cutting the image to fit the defined width and height; see Crop
This resizing function removes parts of the image and is the default behaviour when both width and height are defined. Read further for other resizing functions.
Fit
Resizes the image, keeping proportions and adding padding to satisfy the desired dimensions; see Fit
Cropfit
Performs either Cropor Fit based on image dimensions and transformation parameters; see Cropfit
This resizing function may remove parts of the image.
650x500 origin image, cropped: /sample.li/classroom.jpg?func=cropfit&w=500&h=350&bg_colour=auto
Same parameters, 400x250 origin image: /sample/ny_doc.jpg?func=cropfit&w=500&h=350&bg_colour=auto
Bound
Fits image in a box of defined size without adding padding; see Bound
The boundmin operation is a special case of bound where the smaller dimension is respected instead of the larger one; see Boundmin
Cover
Resizes the image to the given width and height, ignoring original image proportions, thus distorting the image; see Cover
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 updated