From 2a3d7c23e25e465a80875e88a6c30e93c4960680 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 19 Feb 2022 05:20:52 +0100 Subject: [PATCH] Added other sizes --- run_prepareimg.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/run_prepareimg.sh b/run_prepareimg.sh index 0d4f7d9..48df6de 100755 --- a/run_prepareimg.sh +++ b/run_prepareimg.sh @@ -3,7 +3,19 @@ mkdir public/small mkdir public/medium mkdir public/large +echo "Working on small images" +for f in ../strapi.accords-library.com/public/uploads/*; do + filename=$(basename "$f") + ./cwebp -short -m 6 -q 60 -alpha_q 60 -mt -resize 0 512 $f -o public/small/${filename%.*}.webp +done + +echo "Working on medium images" + +for f in ../strapi.accords-library.com/public/uploads/*; do + filename=$(basename "$f") + ./cwebp -short -m 6 -q 75 -alpha_q 75 -mt -resize 0 1024 $f -o public/medium/${filename%.*}.webp +done echo "Working on large images"