M
M
MaxUp2011-12-15 11:32:11
Web servers
MaxUp, 2011-12-15 11:32:11

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

4 answer(s)
Z
zuborg, 2011-12-27
@zuborg

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.

C
cat_crash, 2011-12-15
@cat_crash

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

M
MaxUp, 2011-12-28
@MaxUp

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

A
Alexey Tipa, 2014-01-16
@KayzerSoze

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 question

Ask a Question

731 491 924 answers to any question