From fc282c9fd911113bc8bba02b389c58867a43ddd4 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sat, 10 Aug 2024 11:34:30 +0000 Subject: [PATCH] don't degrade webp images quality --- scripts/optimise-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/optimise-images.sh b/scripts/optimise-images.sh index 4f88a00..9d10329 100755 --- a/scripts/optimise-images.sh +++ b/scripts/optimise-images.sh @@ -40,7 +40,7 @@ optimise_jpeg() { optimise_webp() { local file="$1" local tmpfile="${file}.tmp.webp" - if nice -n 10 ionice -c2 -n7 cwebp -q 80 "$file" -o "$tmpfile"; then + if nice -n 10 ionice -c2 -n7 cwebp -q 100 "$file" -o "$tmpfile"; then mv "$tmpfile" "$file" touch -r "$file" "$file.optimised" # Set .optimised file's modification time to the original file's time chmod 600 "$file.optimised" # Restrict permissions to owner only