Complete tree image optimization

- recursively optimize images using optipng/jpegoptim
benefits:
+ reduces image size
+ decreases load time
+ reduces memory usage
This commit is contained in:
Tad 2019-08-05 20:34:08 -04:00
parent aee6b66dd8
commit 3f8e9a846b
7 changed files with 12 additions and 1 deletions

View file

@ -175,6 +175,12 @@ enableVerity() {
}
export -f enableVerity;
optimizeImagesRecursive() {
find "$1" -type f -name "*.jp*g" -print0 | xargs -0 -n1 -P 16 jpegoptim;
find "$1" -type f -name "*.png" -print0 | xargs -0 -n1 -P 16 optipng;
}
export -f optimizeImagesRecursive;
hardenLocationConf() {
gpsConfig=$1;
#Attempt to get the real device directory