Trimage image compressor losslessly optimizes your PNG and JPG files with very little fuss.
Available with both GUI and command-line interfaces, the application optimizes images via optipng, advpng and jpegoptim, depending on the filetype. The interface was inspired by OS X application ‘imageoptim’.
Trimmage is best installed via its PPA: -
sudo add-apt-repository ppa:kilian/trimage
sudo apt-get update && sudo apt-get install trimage
This way you will remain up-to-date with future fixes and features, automatically have dependencies installed & won’t have to fiddle around compiling. If the latter reasons excite you then Trimage is, of course, available to compile from source.