It would also be helpful to include some command-line tests for dependencies. I had to restart twice as the script exited since I didn't have ImageMagick installed, then libtiff. Having to restart after installing libtiff was especially annoying because the script decided it had to re-optimize all the images again.

Even if the tests aren't included in the script itself, it might be a good idea to post them here. Different distros of Linux come with different packages, so it can be easy to forget whether one has them on a specific machine.