loviuz-website/webp-images.sh

5 lines
189 B
Bash
Executable File

#!/bin/sh
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 80 "$1" -o "${1%.jpg}.webp"' _ {} \;
find ./ -type f -name '*.png' -exec sh -c 'cwebp -q 80 "$1" -o "${1%.png}.webp"' _ {} \;