Answer the question
In order to leave comments, you need to log in
Automatic image optimization on the server
Is there any solution under CentOS to automatically optimize images on the server? I seem to have optimized my server to the maximum according to Google Page Speed, but there is such a moment as pictures. Is there any utility that can load cron and optimize images in selected directories like Page Speed does?
Thank you!
Answer the question
In order to leave comments, you need to log in
jpegoptim and pngcrush
are the first to be able to overwrite files if it was possible to optimize, for png you need to write a wrapper.
The easiest way to search for files is with find, for example, only fresh ones, and send them for processing through xargs.
Cron + Image Magic. How to compress images is easy to google, for example here davidmalin.blogspot.com/2007/08/batch-resize-and-compress-your-images.html
I searched a little more on the same Page Speed 'u - they recommend OptiPNG + jpegoptim. Judging by the code, the parameters are ~ the following
I will experiment today
optipng -o7 -i0
jpegoptim *.jpg --strip-all --max=85 --force
And tell me, gentlemen, what is meant by "optimization"? Does the quality and weight decrease while maintaining the dimensions?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question