~4 years ago we built an application-agnostic jpeg/png/gif recompressor called imageTamer.
It uses advanced recompressors ( cjpegli, pngcrush, gifsicle ) that preserve quality while reducing file size. The downside of these recompressors is that they're slow.
But that's no problem if we recompress the files in a background task.
If the resulting compressed image is not 15% smaller, it is not replaced.
It keeps a database of what images have/have not been compressed and watches the folder you point it to.
It can also rescale if it exceeds a maximum height/width.
On our ~100gb image set, we get a huge reduction in size.
Results are similar to mass webp conversion.
The below image is an average example of cjpegli in action. The image is zoomed 2x to help display compression artifacts and detail loss.
cjpegli is genius technology. The magic is doing a good job prioritizing what details to keep and throw away.
Below, we are using an equivalent to a 83% jpeg quality and we are also rescaling.
The software is not user friendly at this moment, but, if you have a pressing need to squish a large amount of images, something could be worked out.