7.1.0 • Published 3 years ago

@porky-prince/mozjpeg v7.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

mozjpeg-bin GitHub Actions Status

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.

use https://npm.taobao.org/mirrors/mozjpeg-bin/ as downlaod source

Install

$ npm install mozjpeg

Usage

const {execFile} = require('child_process');
const mozjpeg = require('mozjpeg');

execFile(mozjpeg, ['-outfile', 'output.jpg', 'input.jpg'], err => {
	console.log('Image minified!');
});

CLI

$ npm install --global mozjpeg
$ mozjpeg --help

License

MIT © Imagemin