This package has been deprecated

Author message:

This package is no longer maintained. Please use `imagemin`.

image-optim

3.0.0 • Public • Published

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

Package Sidebar

Install

npm i image-optim

Weekly Downloads

62

Version

3.0.0

License

MIT

Last publish

Collaborators

  • sbspk