img-compressor-js
is a simple image compression library for web applications. It provides an easy-to-use interface for reducing the size of images, which is particularly useful for optimizing images for better web performance before uploading to a server.
- Compress images using browser-side JavaScript.
- Customize the maximum dimensions and quality of the output image.
- Return a compressed image as a
File
object and itspreviewUrl
for immediate display.
Install img-compressor-js
using npm:
npm install img-compressor-js --save