Skip to main content
Browse Documentation

Resizing

Created by Richard Saunders, last updated 14 Nov 2018

Width

Image width represents the width of the output image. The width or w parameter allows you to dynamically resize the image based on pixels values. If only the width is provided, then the image is scaled to the new dimension while retaining the original aspect ratio.


Height

Image height represents the height of the output image. The height or h parameter allows you to dynamically resize the image based on pixels values. If only the height is provided, then the image is scaled to the new dimension while retaining the original aspect ratio.


Width and height

When both the width and height parameters are provided, the image is resized so that it takes up as much space as possible within the bounding box defined by the given width and height parameters. The original aspect ratio is retained and all of the original image is visible.


Note: When using a width/height parameter greater than the original image width/height, the image is returned at it's original width/height value. If you are looking to upscale an image you'll need to use the fit=contain parameter.