Resizes the image to fit into a specified width and height box, adds padding (image or solid colour) to keep proportions, and delivers the resulting image via CDN.


The padding can be customised using the following additional operations:

function name description
gravity gravity=X
X = [north | south][east | west]
sets the position of the image in the fit box
solid background bg_colour=X | bg_color=X defines a background colour either with a hex code or colour name
blurred background bg_img_fit=1 sets blurred image background
bg_blur=X applies Gaussian blur to the background image
X = 0..1
specifies background image opacity
bg_colourise=X | bg_colorize=X defines a colour to tint the background image

Solid colour padding


For details, please see the solid background section.

Blurred background


All options are listed in the blurred background section.


The gravity=X operation sets the position of the image when padding is added. Possible values are:

northwest north northeast
west centre | center east
southwest south southeast

If not explicitly set, the default gravity is centre.

For example, by setting gravity to south, the image is positioned at the bottom and the padding is added at the top.