Skip image optimization if opting or jpegtran are not installed

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Reduce the list of extensions supported by opting to 'png'.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>