summaryrefslogtreecommitdiff
path: root/compress.sh
diff options
context:
space:
mode:
Diffstat (limited to 'compress.sh')
-rw-r--r--compress.sh8
1 files changed, 3 insertions, 5 deletions
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