upi

uppy-plugin-image-compressor

Compresses images added to Uppy before upload, using compressorjs package

Showing:

Popularity

Downloads/wk

731

GitHub Stars

15

Maintenance

Last Commit

2yrs ago

Contributors

0

Package

Dependencies

3

Size (min+gzip)

19.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Uppy Image Compressor

Uppy logo: a superman puppy in a pink suit

ImageCompressor is an Uppy file uploader plugin, that compresses images before upload, saving bandwidth.

ImageCompressor uses Compressor.js, and the compression is lossy. From Compressor.js readme:

JavaScript image compressor. Uses the Browser's native canvas.toBlob API to do the compression work, which means it is lossy compression. General use this to precompress a client image file before upload it.

⚠️ This is not an official Uppy plugin, so no support is offered for it. Please use at your own risk.

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

const Uppy = require('@uppy/core')
const ImageCompressor = require('uppy-plugin-image-compressor')

const uppy = Uppy()
uppy.use(ImageCompressor, {
  // Options from Compressor.js https://github.com/fengyuanchen/compressorjs#options, just don’t set `success` or `error`
})

Installation

$ npm install uppy-plugin-image-compressor --save

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial