bachub/image-resize

Description

It resizes any image given as the url parameter to a maximum width or height while preserving aspect ratio.

Parameters

  • width (optional): integer

    Maximum width in pixels.

  • height (optional): integer

    Maximum height in pixels.

  • input (required): file(s)

    URLEncoded URL(s) of the original image(s) (documentation).

How to use it

Call https://bachub.com/bachub/image-resize/use and append some parameters as query string or use the input form above.

Examples

Reduce an image to a maximum width of 250 pixels
https://bachub.com/bachub/image-resize/use?width=250&input=https%3A%2F%2Fstatic.bachub.com%2Ftest%2Fimage%2F1.jpg
Reduce two images to a maximum height of 100 pixels and download tar archive
https://bachub.com/bachub/image-resize/use?height=100&input[]=https%3A%2F%2Fstatic.bachub.com%2Ftest%2Fimage%2F1.jpg&input[]=https%3A%2F%2Fstatic.bachub.com%2Ftest%2Fimage%2F2.jpg