|
|
há 5 anos atrás | |
|---|---|---|
| .. | ||
| lib | há 5 anos atrás | |
| cli.js | há 5 anos atrás | |
| index.js | há 5 anos atrás | |
| license | há 5 anos atrás | |
| package.json | há 5 anos atrás | |
| readme.md | há 5 anos atrás | |
mozjpeg is a production-quality JPEG encoder that improves compression while maintaining compatibility with the vast majority of deployed decoders
You probably want imagemin-mozjpeg instead.
$ npm install mozjpeg
const {execFile} = require('child_process');
const mozjpeg = require('mozjpeg');
execFile(mozjpeg, ['-outfile', 'output.jpg', 'input.jpg'], err => {
console.log('Image minified!');
});
$ npm install --global mozjpeg
$ mozjpeg --help
MIT © Imagemin