ImageResizer
Image resizer allows you to resize all sorts of images really fast, using amazing sharp library.
Resizing an image
The resizeImage
function expects configuration object with image (buffer), width, hegiht and quality (optional).
resizeImage Configuration
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
Reading Exif
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.
Last updated