From d9f79376ec29443b86eeec9c00517bd0a2a36842 Mon Sep 17 00:00:00 2001 From: henk Date: Tue, 9 May 2023 15:18:09 +0200 Subject: [PATCH] 2023-05-09 15:18:09 --- linux/WEBP.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 linux/WEBP.sh diff --git a/linux/WEBP.sh b/linux/WEBP.sh new file mode 100644 index 0000000..bfc7e6c --- /dev/null +++ b/linux/WEBP.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# maak plaatjes kleiner +# apt install webp -y + +# Convert PNGs +find . -iname "*.png" -print0 | xargs -0 -n 1 -P 0 -I '{}' cwebp '{}' -short -q 90 -alpha_q 100 -m 6 -o '{}'.webp + +# Convert JPGs +find . \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -n 1 -P 0 -I '{}' cwebp -short -q 80 '{}' -o '{}'.webp +