npm.io
8.0.0 • Published 4 years agoCLI

mozjpeg

Licence
MIT
Version
8.0.0
Deps
2
Size
1.6 MB
Vulns
0
Weekly
0
Stars
121
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

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.

Install

$ npm install mozjpeg

Usage

import {execFile} from 'node:child_process';
import mozjpeg from 'mozjpeg';

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

CLI

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

License

MIT Imagemin

Keywords