Resizing
Width
Parameter: width
Unit: pixels
Resize the image to match the given width while maintaining the current aspect ratio.
Height
Parameter: height
Unit: pixels
Resize the image to match the given height while maintaining the aspect ratio.
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.
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.
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.
Updated about 2 months ago