Documentation

Transforms

MageCDN supports transforming images on-the-fly using query parameters. Transforms can be combined with each other and with the output format parameter.


Resize (?sz)

The sz parameter resizes an image. There are three ways to specify the target size:

Using percentage (p)

Resizes image by specifying percentage.
Example: f1e63d_image?sz=95p will resize image to 95% of the original image.

Using width (w)

Resizes image by specifying width, while preserving aspect ratio.
Example: f1e63d_image?sz=512w will resize image to 512px width.

Using width, height

Resizes image by specifying both width and height.
Example: f1e63d_image?sz=1024,512 will resize image to 1024px width and 512px height.


Crop (?cp)

The cp parameter crops the image. The crop area is specified in the format: x,y,w,h, where (x, y) are starting points and (w, h) are the dimensions of the crop rectangle.

Example: f1e63d_image?cp=0,0,100,100 will create a crop area of 512 x 512px starting on (0, 0) position