'Is there are way to compress Buffer data to a smaller size with NodeJS?
I'm working on a Lambda function which fetches images from a Google drive and uploads it to S3 bucket.
The format of the data I'm working with is a Buffer and when I upload it to S3 bucket the size is 2.8mb. However I need to compress it to be under 2mb. I can't seem to find a suitable library which can handle this server side.
Any advice?
Solution 1:[1]
For compressing images and storing it, you may use Jimp which is an image processing library and provides all the facilities you're looking for.
For reference, you may go to this documentation
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Chirag |
