node package manager


jpegoptim imagemin plugin


jpegoptim imagemin plugin

$ npm install --save imagemin-jpegoptim

See jpegoptim-bin's install section for requirements.

const imagemin = require('imagemin');
const imageminJpegoptim = require('imagemin-jpegoptim');
imagemin(['images/*.jpg'], 'build/images', {
    use: [
}).then(() => {
    console.log('Images optimized');

Returns a promise for a buffer.

Type: boolean
Default: false

Lossless conversion to progressive.

Type: number

Set maximum image quality factor. (0-100).

Type: number string

Try to optimize file to given size. Target size is specified either in kilo bytes (1-) or as percentage (1%-99%).

Type: buffer

Buffer to optimize.

MIT © imagemin