Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 1.3 KB

README.md

File metadata and controls

54 lines (43 loc) · 1.3 KB

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