0.1.5 • Published 5 years ago

optimize-png-for-web v0.1.5

Weekly downloads
96
License
-
Repository
-
Last release
5 years ago

Installation

yarn add optimize-png-for-web

Also, you need to install pngquant and zopflipng. On Mac you can do it via Brew; brew install pngquant and brew install zopfli respectively.

Usage

Check usage example in test.js file:

require('./src/index')('./sample-images', './out', {
	resizeTo1x2x: true,
	emitErrorsOnWarnings: false,
})

If resizeTo1x2x is false than images will not be resized.

If emitErrorsOnWarnings is true than all warning will produce errors and will stop script execution.