Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a command line tool which losslessly compresses all the images in the passed directory using yahoo!'s image compression utility -

Directions for use:
java -jar smushit.jar [options]

Mandatory options:
Root directory of the images to be smushed. The program recursively traverses all sub directories of this directory smushing images.

Optional Options:
Will out put details messages on screen.
Will not download the smushed images.
Specify a list of comma separated image extensions. Only images with those extensions will be smushed.

Example usage:
java -jar smushit.jar -imageDir=/foo -verbose=true -dryRun=false -imgExtensions=gif,png,jpeg

The above will smush all the images with extension gif,png,jpeg in directory foo and it's sub directories and will download the smushed images and replace original with the smushed images.

Sometimes smushit converts gifs to pngs if the resulting png files are smaller. Take a look at this faq - . If this happens with your images, your image folder will have the original image as well as the newly converted png image.