image compression in nodejs 1

image compression in nodejs

Install npm install browser-image-compression --save

Here is what the above code is Doing:
1. We are using the FileReader API to read the file as a data URL.
2. We are using the canvas.toBlob API to save the file as a PNG file.
3. We are using the URL API to revoke the object URL.

Similar Posts