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