Open luboslives opened 3 years ago
What do you think about filtering output using grep, like image_optim --no-progress … | grep -v '^------ '
?
What do you think about filtering output using grep, like
image_optim --no-progress … | grep -v '^------ '
?
Thanks, that will do the trick! You can leave this idea open if you feel like it might be worth implementing into image_optim.
Hi again @toy.
I have a service which runs a script which runs
image_optim
over an entire WordPress uploads directory, so I also keep a cache of previously-optimized images using--cache-dir
.Unfortunately by default,
image_optim
prints out the complete list of files it checked in the directory. In this case, that is thousands of image files dating back several years. So at a certain point the results stop printing to my systemd service log.Example, I upload
img2
to the WordPress media uploads dir. I would get thousands of skipped files and the one optimized file:With the service log, it just stops printing around the year 2016. I'm using
--no-progress
and that saves a few lines, but this should probably have its own flag.So, I would really benefit from only seeing the savings of the newly optimized images. You can decide if you want to make this the default behaviour and maybe add a new flag like
--show-skipped-files
or--print-cached-files
, or you could keep the default behaviour and add a flag like--quite-mode
or maybe create levels of verbosity?....-v 1
,-v 2
. That would clash with the old-v
flag though.