node package manager


jpegoptim wrapper that makes it seamlessly available as a local dependency


jpegoptim is a utility for optimizing JPEG files that provides lossless optimization (based on optimizing the Huffman tables) and "lossy" optimization based on setting a maximum quality factor

$ npm install --save jpegoptim-bin

Make sure you have the correct version of libjpeg. See jpegoptim's README for more information.

var execFile = require('child_process').execFile;
var jpegoptim = require('jpegoptim-bin');
var args = [
execFile(jpegoptim, args, function (err) {
    console.log('Image minified');
$ npm install --global jpegoptim-bin
$ jpegoptim --help

MIT © imagemin