Not only does this plugin work really well, reliably optimizing JPGs, GIFs, and PNGs as they're uploaded to the WP Media library, the author, Shane Bishop, is a pleasure to work with. He's helped me out on several occasions, explaining the plugin's behavior and working to improve the plugin's settings interface.

Thanks to Wordfence for finding and disclosing the vulnerability and to Shane for patching it up overnight.