Width

Parameter: width
Unit: pixels

Resize the image to match the given width while maintaining the current aspect ratio.

?width=**500**

?width=500

?width=**250**

?width=250

Height

Parameter: height
Units: pixels

Resize the image to match the given height while maintaining the aspect ratio.

?height=**250**

?height=250

?height=**150**

?height=150

Width vs height

If both width and height parameters are defined, the one that produces smaller image while preserving aspect ratio will take effect.

Lets look at the following image. Its dimensions are 500x333.

Starting image.

Starting image.

?width=**300**&height=**250**

?width=300&height=250


Now we want to apply the following query parameters: ?width=300&height=250 to it. Lets see what results we get if we apply them separately.

?width=**300**

?width=300

height=250

The second image is smaller and that is also the result of ?=width=300&height=250.

Priority

Crop operations have priority over the width or height commands. If any crop is defined in the query it will be applied first.