#!/usr/bin/env bash

function recursive_optimize_images() {
cd $1;
optipng -o6 -strip all *.png;
jpegoptim --strip-all *.jpg;
for svg in `ls *.svg`;
do
    mv $svg $svg.opttmp;
    scour -i $svg.opttmp -o $svg --create-groups --enable-id-stripping --enable-comment-stripping --shorten-ids --remove-metadata;
done;
rm *.opttmp
for dir in `ls -d */`;
do
    recursive_optimize_images $dir;
    cd ..;
done;
}

recursive_optimize_images ../../

#!/usr/bin/env bash

function recursive_optimize_images() {
cd $1;
optipng -o6 -strip all *.png;
jpegoptim --strip-all *.jpg;
for svg in `ls *.svg`;
do
    mv $svg $svg.opttmp;
    scour -i $svg.opttmp -o $svg --create-groups --enable-id-stripping --enable-comment-stripping --shorten-ids --remove-metadata --strip-xml-prolog --no-line-breaks;
done;
rm *.opttmp
for dir in `ls -d */`;
do
    recursive_optimize_images $dir;
    cd ..;
done;
}

recursive_optimize_images ../../

Remove XML heared and line breaks in SVG files.
Remove XML heared and line breaks in SVG files.

My suggestion for further SVG optimiztion - as mentioned in #5229

Signed-off-by: Marin Treselj <52d9a2cc899a8db7044d09f9abec336fb5fb7086@pixelipo.com>
