Pngquant compress images in place
Pngquant compress images in place#
Convert images in place:
pngquant --strip --verbose --force --ext .png --speed 2 *
Run pngquant recursively on subfolders:
Create a bash script shrink_png.sh
:
for file in `find /var/www/my_site/images/. -name '*.png'`; do
pngquant --strip --verbose --speed 1 --force --ext '.png' $file
done