Running it for the first time

A lot of work has gone into making it set-and-forget. If you're running it for the first time, this command should be all you need:

imagy /awesome/images/

Imagy will run through the directory /awesome/images/ and all its subdirectories and optimize all image files it finds. After that it will watch these directories for images that get created or modified.

The algorithms used are stable (don't further modify files after multiple invocations), however to make trying Imagy out as easy as possible, the default is to keep original files around for later reversal. For example the file /file.jpg would be copied to /file-original.jpg before optimization. If the optimized fileis not smaller than the original, no copy gets stored and the original file remains unchanged.

Further Usage

If after some time you wish to stop using Imagy, run imagy --revert which will move all original images back to their initial location.

If you have (rightfully) come to the conclusion that you don't really need to keep originals around, set KEEP_ORIGINALS in config.py to False. If you want to delete all already stored originals run imagy --deloriginals.

Credits

In the background Imagy uses the awesome library smush.py which exposes a general interface to handle the various file types.

Notes

I use Imagy in production at sc2wow.com. I was able to save 150kB off my frontpage load, saving anywhere from 5% to 50% per image, though your results may differ.