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.
# Install
Guetzli must be installed on your system. Follow the official instructions.