unrepair-website/to-webp.sh
2025-03-11 14:41:31 +01:00

13 lines
255 B
Bash

#!/bin/bash
if ! command -v cwebp &> /dev/null; then
echo "Error: cwebp is not installed"
exit 1
fi
for img in "src/assets/repair-logs"/*.{jpg,jpeg,png}; do
# Convert to WebP
cwebp -q 80 "$img" -o "${img%.*}.webp"
rm "$img"
done