A fork of janfoeh's paperclip-optimizer gem (https://github.com/janfoeh/paperclip-optimizer/) to be used with paperclip 4.0+