imagemin-oxipng-include-oxipng-bin
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

OxiPNG plugin for Imagemin

Usage

const imagemin = require('imagemin');
const imageminOxipng = require('imagemin-oxipng');

(async () => {
	await imagemin(['images/*.png'], {
		destination: 'build/images',
		plugins: [
			imageminOxipng()
		]
	});

	console.log('Images optimized');
})();

API

imageminOxipng(options?)(input)

Returns Promise<Buffer>.

options

Type: object

quality

Type: number
Default: 2
Values: 1 (faster) to 6 (better compression)

Optimization: -o 1 through -o 6, lower is faster, higher is better compression. The default (-o 2) is sufficiently fast on a modern CPU and provides 30-50% compression gains over an unoptimized PNG. -o 4 is 6 times slower than -o 2 but can provide 5-10% extra compression over -o 2. Using any setting higher than -o 4 is unlikely to give any extra compression gains and is not recommended.

Package Sidebar

Install

npm i imagemin-oxipng-include-oxipng-bin

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

6.06 MB

Total Files

10

Last publish

Collaborators

  • cong_wa