Guetzli is a Google program to optimize JPEG images. Unfortunately, it only works one file at a time. With this script in Python you can do it recursively a whole folder.
UPDATE GUI for Mac OS
Guetzli must be installed on your system. Follow the official instructions. Guetzli
and 2.7.10 or Python 3.
python3 guetzli-recursively.py [folder]
python3 guetzli-recursively.py img
out
img/tasks.jpg
Save 6%
img/portfolio/idecrea/space.jpg
It is not necessary to optimize
img/portfolio/home.jpg
Save 3%