How to optimize all JPG/JPEG files in a directory using jpegoptim
This is very useful in optimizing photo archives etc without changing the directory structure:
example.sh
find . -name "*.jpg" -exec jpegoptim {} \;
find . -name "*.jpeg" -exec jpegoptim {} \;
find . -name "*.JPG" -exec jpegoptim {} \;
find . -name "*.JPEG" -exec jpegoptim {} \;
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow