Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/imagemin/mozjpeg-bin

mozjpeg bin-wrapper that makes it seamlessly available as a local dependency
https://github.com/imagemin/mozjpeg-bin

Last synced: 3 days ago
JSON representation

mozjpeg bin-wrapper that makes it seamlessly available as a local dependency

Awesome Lists containing this project

README

        

# mozjpeg-bin ![GitHub Actions Status](https://github.com/imagemin/mozjpeg-bin/workflows/test/badge.svg?branch=main)

> [mozjpeg](https://github.com/mozilla/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`](https://github.com/imagemin/imagemin-mozjpeg) instead.

## Install

```
$ npm install mozjpeg
```

## Usage

```js
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](https://github.com/imagemin)