Jpegoptim is a Linux software that does what the name suggests: is does optimize jpg images. It is one of the two recommended software for Google Pagespeed optimization.
As this software doesn't have a recursion parameter, we use a trick to parse all the subdirectories where we have jpeg images to be optimized.
The command uses find:
find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;
Now be patient and wait until it does the job. You will probably be surprised how much it can reduce the size of some images (up to 40% for some thumbnails!).
Read about how to optimize PNG and GIF files with OptiPNG.
If you know a better aproach into using this cool software, please leave a comment below.
Category:
Comments
Don't forget those files that
Don't forget those files that end with .jpeg! :)
Yeah, very seldom used, but
Yeah, very seldom used, but thanks for reminding!
You need to put a directory
You need to put a directory to search, ie
find . -type f //etc
The . will start in the current directory.
thanks, for the tutorial :)
thanks, for the tutorial :)
@walk i just changed it to "*.jp*g" :)