ImageResizer
Last updated
Last updated
Image resizer allows you to resize all sorts of images really fast, using amazing library.
The resizeImage
function expects configuration object with image (buffer), width, hegiht and quality (optional).
All keys are mandatory unless stated differently.
key
type
description
width
number
expected maximum image width of resized image
height
number
expected maximum image height of resized image
image
Buffer
actual image Buffer
quality (optional)
number
quality of jpg output, defaults to 90
Using ImageResizer module, you can also read exif from image files (if available). Generally ImageResizer.exif
will return at least width and height. If exif is available, it will be provided too.