You can install with homebrew
brew install optipng jpeg
Debian, Ubuntu and Mint
apt-get install optipng libjpeg libjpeg-progs
Both libraries are easy to find for RPM distributions too.
Don't worry because both libraries are included.
Install this task next to your project's grunt.js gruntfile with:
npm install grunt-img
Then add the line bellow to your project's
Questions? Take a look at this stream
Grunt provide a simple way to config its tasks, grunt-img follow the same principle:
MIT License (c) Helder Santana