From d285ed9a3bb64841d6f69c5e32afc5053d6dfb92 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 19 Dec 2022 10:31:08 +0530 Subject: [PATCH] chore: replace imagemagick with libwebp --- flake.nix | 2 +- scripts/pngtowebp.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 03afdb6..f94161d 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ git go hugo - imagemagick + libwebp nodejs-16_x yarn ]; diff --git a/scripts/pngtowebp.sh b/scripts/pngtowebp.sh index 2ebdff1..6b21a0f 100755 --- a/scripts/pngtowebp.sh +++ b/scripts/pngtowebp.sh @@ -2,5 +2,5 @@ set -euxo pipefail -fd -tf png$ static/uploads -x convert {} -quality 100 -define webp:lossless=true {.}.webp +fd -tf png$ static/uploads -x cwebp -lossless -mt {} -o {.}.webp fd -tf png$ static/uploads -X rm -v