From 959f915c9e545a7fe8cafce9916eea377181201e Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 8 Nov 2016 11:27:37 +0100 Subject: use webp for images, load icons offline --- compress.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'compress.sh') diff --git a/compress.sh b/compress.sh index 2646a56..8cbe9e4 100644 --- a/compress.sh +++ b/compress.sh @@ -1,8 +1,6 @@ #!/usr/bin/bash RATIO=10 cd static/images -mkdir -p min/ max/ -#find -maxdepth 1 -name "*.jpg" | xargs -I_ convert -scale $((100/$RATIO))% -scale $((100*$RATIO))% -gaussian-blur x${RATIO} -interlace Plane -quality 70% _ min/_ -COMPRESSOPTS="-strip -interlace Plane -quality 75%" -find -maxdepth 1 -name "*.jpg" | xargs -I_ convert -gaussian-blur x${RATIO} $COMPRESSOPTS -verbose _ min/_ -find -maxdepth 1 -name "*.jpg" | xargs -I_ convert $COMPRESSOPTS -verbose _ max/_ +mkdir -p min/ +find -maxdepth 1 -name "*.jpg" -print0 | xargs -0 -I_ convert -strip -interlace Plane -quality 75% -verbose _ min/_ +find -maxdepth 1 -name "*.jpg" -print0 | sed "s,\.jpg,,g" | xargs -0 -I_ convert -strip -interlace Plane -quality 75% -verbose _.jpg min/_.webp -- cgit v1.3.1