Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

mole-inc/jpegoptim-bin

 
 

Repository files navigation

jpegoptim-bin Node CI

jpegoptim is a utility for optimizing JPEG files that provides lossless optimization (based on optimizing the Huffman tables) and "lossy" optimization based on setting a maximum quality factor

You probably want imagemin-jpegoptim instead.

Downloads Version codecov

Install

$ npm install @mole-inc/jpegoptim-bin

Make sure you have the correct version of libjpeg. See jpegoptim's README for more information.

Usage

import {execFile} from 'child_process';
import jpegoptim from '@mole-inc/jpegoptim-bin';

const args = [
	'--overwrite',
	'--strip-all',
	'--strip-iptc',
	'--strip-icc',
	'--all-progressive',
	'--dest=build',
	'input.jpg'
];

execFile(jpegoptim, args, err => {
	console.log('Image minified');
});

CLI

$ npm install --global @mole-inc/jpegoptim-bin
$ jpegoptim --help

License

This is a fork of imagemin/jpegoptim-bin licensed under the MIT License.

see license file and vendor/jpegoptim-license.txt file.

About

jpegoptim bin-wrapper that makes it seamlessly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.6%
  • Shell 3.4%