OptiPNG imagemin plugin
optipng image-min plugin
$ npm install --save imagemin-optipng
const imagemin = ;const imageminOptipng = ;;
Returns a promise for a buffer.
Select an optimization level between
The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of existing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what. OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials.
Level and trials:
Buffer to optimize.
MIT © imagemin