Answer the question
In order to leave comments, you need to log in
How to optimize thousands of images with a condition?
Good afternoon.
It is necessary to optimize a lot of images (500 thousand). I do it as a team
find . -type f \( -name "*.jpeg" -or -name "*.jpg" \) -exec mogrify x-quality 80 {} \; -exec jpegoptim -o --strip-all {} \;
Answer the question
In order to leave comments, you need to log in
Add conditions like this
if ; then INSERT_RESIZE_COMMAND; fi
if ; then INSERT_RESIZE_COMMAND; fi
I didn’t work very well with ImageMagick, but on the Internet they say that such crap is enough for themselves. \>
Something like this
find * -iname '*.jpg' -print0 | xargs -0 mogrify -resize 800x800\> -monitor -format jpg
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question