Skip to main content

Resize

Request a resized image that fits in a rectangle of given width and height without changing the aspect ratio.

TransformationExamplesDescription
resize=width,heightresize=100,100request a resized image that fits in a rectangle of given width, height
resize=width,height,fill:colorresize=100,150,fill:red resize=100,100,fill:blueresize and fill any gaps with given color

The transformation parameters are described below:-

ParameterDescription
widthwidth of the transformation requested. Specify 0 (zero) for original source image width or the maximum allowed (2048)
heightheight of the transformation requested. Specify 0(zero) for original source image height or the maximum allowed (1536)
fill:color(optional) fill color to fit to the specified size when preserving aspect ratio. color can be auto, transparent or HTML color name such as red or hexadecimal color code such as FF0000