pngquant imagemin plugin
npm install imagemin-pngquant-vendor> pngquant imagemin plugin
```
$ npm install --save imagemin-pngquant
`js
const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');
imagemin(['images/*.png'], 'build/images', {use: [imageminPngquant()]}).then(() => {
console.log('Images optimized');
});
`
Returns a Promise for a Buffer.
#### options
##### floyd
Type: number boolean0.5
Default:
Controls level of dithering (0 = none, 1 = full).
##### nofs
Type: booleanfalse
Default:
Disable Floyd-Steinberg dithering.
##### posterize
Type: number
Reduce precision of the palette by number of bits. Use when the image will be
displayed on low-depth screens (e.g. 16-bit displays or compressed textures).
##### quality
Type: string
Instructs pngquant to use the least amount of colors required to meet or exceed
the max quality. If conversion results in quality below the min quality the
image won't be saved.
Min and max are numbers in range 0 (worst) to 100 (perfect), similar to JPEG.
##### speed
Type: number3
Default:
Speed/quality trade-off from 1 (brute-force) to 10 (fastest). Speed 10 has
5% lower quality, but is 8 times faster than the default.
##### verbose
Type: booleanfalse
Default:
Print verbose status messages.
#### input
Type: Buffer Stream`
Buffer or stream to optimize.
MIT © imagemin