3.0.0 • Published 9 years ago
image-optim v3.0.0
Cross platform nodejs wrapper for optipng and jpegtran
####Supported Platforms
- Windows
- Mac
- Linux
####Installation
npm install image-optim
####Usage
import optimizer from 'image-optim';
optimizer.optimize('path/to/image.png')
.then(()=> {
console.log('Successfully optimized image.')
})
.catch((err)=> {
console.log('Failed to optimize image', err);
})
jpeg/jpg files are optimized with jpegtran and png files are optimized with optipng.
####License MIT