for png, install on centos using command
1 | yum install optipng |
for a single image
1 | optipng -o5 filename.png |
move to folder in which pngs are stored and use the following command:
1 | for i in *.png; do optipng -o7 -strip all -quiet "$i"; done |
this will overwrite all pngs, o7 is switch for number of tries. o5 will be less time consuming though. -quiet makes it muted, outputs nothing.
-strip all will try to remove all meta data.
you can use -preserve to preserve the modification date.
also try -keep, if you want to save backup of each file
Leave a Reply