What does it do?
This snippet optimises and compresses PNG and JPEG images for better performance using the resmush.it optimisation API. This will help with Google Page Speed and can reduce image sizes by up to 70%. This will overwrite any existing images so is intended to be used as an output filter after
pthumb or similar.
This works best on alpha transparent PNGs but it normally creates some saving on JPEG images too.
Here are some examples of MODX SmushIt in action and the savings made on various image formats and sizes.
This snippet expects to be used as an output filter so could be used after you have resized the image using pthumb, phpthumbsup or similar. You could also use this on it's own if you simply wanted to optimise the image.
This will use pthumb to resize the image and then smush it to optimise the file. The thumbnail image is overwritten once and from then on is optimised. This affects first uncached performance so you should review if this is worthwhile. After caching it runs fine and then helps the page load speed by using the new files.
As this is a first release, please use caution when using on a production site.
I currently use this on a few sites but would like your help in testing and reporting any bugs. Your feedback and feature requests are most welcome.