plasticine/middleman-imageoptim — pull request #8 by jeffutter (2013-12-30 17:55:50+00:00)
Title: Respect plugin order in config.rb

after_build should be inside after_config to respect order of plugins in config.rb. Without this images generated by other plugins (such as thumbnailer) don't get optimized because imageoptim is registered before those are run.

There is a similar issue discussed here:
http://forum.middlemanapp.com/t/order-of-after-build-callbacks/901/6