0.0.1 • Published 4 years ago

@ammoti/image-reducer v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

alt text

image-reducer

image-reducer just a another image compression package powered by imagemin. It's goal is that bring all imagemin plugin use single package. At this moment its allow just third plugin mozjpeg, jpegtrani pngquant I will add more plugin in the future.

npm.io npm.io

Build Status

npm.io

Install

Requires Node >=10.

From npm,

npm i image-reducer

From Github Package Registry. (Guide).

Type definitions are bundled with this package.

Usage

Main functions taking three parameters, First one input you can give a string array or directly file path does not matter. second is destination after compression where files will be stored, and third one is the algorithm array which is compression algorithm. And return a Promise.

Currently pngquant using quality: 0.2, 0.5 and mozjpeg using 65 I will add options parameter in the future commits.

main(input: string | string[], destination: string, compressMethod: CompressType[]): Promise<CompressReport[]>;

Example

I put a test file under example folder you can check it.

Contribution

All contributions and issues are welcome.

Licence

MIT © ammoti