SmileyChris/easy-thumbnails — pull request #265 by jrief (2013-09-27 15:53:53+00:00)
Title: Postprocessor

This PR fixes some issues from #257.

Additionally, I added an optional postprocessor for image optimization. It can be activated by adding:
```
INSTALLED_APPS = (
...
'easy_thumbnails.optimize'
...
)
```
and using the setting:
```
THUMBNAIL_OPTIMIZE_COMMAND = {
'png': '/opt/local/bin/optipng {filename}',
'gif': '/opt/local/bin/optipng {filename}',
'jpeg': '/opt/local/bin/jpegoptim {filename}',
}
```

Sure, this could be installed as a 3rd party app, but consider that
- developers are strongly encouraged to optimize images after upload, so the audience is almost the entire user base of easy_thumbnail.
- this app contains less than 50 lines of code. Installing another micro-app from PyPI certainly is more embarrassing than getting some additional code, which in a few cases, might not be used.

Of course, if you don't like this embedded app approach, I'll move the optimizer into a micro-app.
Docs and unittests will come.

BTW: I did not like the approach of image_diet, therefore I reused the idea from my previous patch. This one honors the storage object.