node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

icompress

imgcompress

base on imagemin for image compress

Install

npm install icompress

Usage

 
var icompress = require('icompress');
 
icompress('images/*.{gif,jpg,png}','images/min/').then(function( res ){
    //do something  
});
 
/**
 * @param  {[path]} src  [image path]
 * @param  {[dir]} dest [output dirname]
 * @return {[object]}      [promise]
 */
 
/*
@return
{
    original : 17004,
    result : 9750,
    src : '/var/www/tmp/image.jpg'
}
*/