Skip to content
forked from heldr/grunt-img

A tool to optimize PNG and JPG images with pngcrush & jpegtran.

Notifications You must be signed in to change notification settings

ksky521/imagemin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imagemin

A tool which fork from grunt-img to optimize PNG and JPG images with pngcrush & jpegtran (jpegtran-turbo on win32).

Getting Started

First, be sure that you have jpegtran installed in your system.

for Mac users

You can install with homebrew

brew install jpeg

for Linux users

Debian, Ubuntu and Mint

apt-get install libjpeg libjpeg-progs

Both libraries are easy to find for RPM distributions too.

for Windows users

Don't worry because both libraries are included.

Install

npm install imagemin

How to use

for shell

imagemin file/path
imagemin file/path -o new/file/path

for nodejs

var imagemin = require('imagemin');
imagemin(filePath, destDir, callback);

Credits

About

A tool to optimize PNG and JPG images with pngcrush & jpegtran.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.5%
  • Shell 6.5%