One easy way of reducing website load time is by optimizing your images, which is what PNGCrush does. PNG graphics are often more bloated than they need to be so using PNGCRUSH should be obvious.
Basic usage flags don’t allow for recursive directories so needs to be put inside a loop.
crushes the image with all ~114 possible methods and picks the smallest.
does lossless colour type or bit depth reduction. Eg, if there are only 5 unique colours, there’s no need for a colour palette of 256.
Running script without parameters will do all files files from current working directory, or first param can be location. Example usage:
$ recursivepngcrush .
$ recursivepngcrush ~/images/folder/
for PNG in `find $FILTER -name "*.png"`;
echo "Crushing $PNG"
pngcrush -brute -reduce "$PNG" $TFILE
mv -f $TFILE $PNG