libo 发表于 2018-6-6 09:48:20

Linux 批量无损压缩图片


安装JPG和PNG压缩


yum install jpegoptim
yum install optipng

然后在需要压缩的目录下执行如下命令进行压缩jpg格式的图片


//压缩JPG
find . -name '*.jpg' | xargs jpegoptim --strip-all

//压缩PNG
find -type f -name "*.png" -exec optipng {} \;

页: [1]
查看完整版本: Linux 批量无损压缩图片