Skip to content
main
Switch branches/tags
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
Oct 22, 2021
May 25, 2019
Oct 23, 2021

optipng-bin GitHub Actions Status

OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information

You probably want imagemin-optipng instead.

Install

$ npm install --save optipng-bin

Usage

import {execFile} from 'node:child_process';
import optipng from 'optipng-bin';

execFile(optipng, ['-out', 'output.png', 'input.png'], error => {
	console.log('Image minified!');
});

CLI

$ npm install --global optipng-bin
$ optipng --help