perpetuum mobile
12. 12. 2014. image manipulation * linux * ubuntu

JPG compression (command line) with jpegoptim

Installation:

$ sudo apt-get install jpegoptim

Optimizing a single file:

$ jpegoptim file.jpeg
$ jpegoptim [options] file.jpeg

Optimizing files in a batch:

$ for i in one.jpeg two.jpeg foo.jpeg; do jpegoptim "$i"; done
$ for i in *.jpg; do jpegoptim -m95 "$i"; done

Resources