mozjpeg wrapper that makes it seamlessly available as a local dependency
npm install mozjpeg> 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
`js
import {execFile} from 'node:child_process';
import mozjpeg from 'mozjpeg';
execFile(mozjpeg, ['-outfile', 'output.jpg', 'input.jpg'], err => {
console.log('Image minified!');
});
`
``
$ npm install --global mozjpeg
```
$ mozjpeg --help
MIT © Imagemin