Konwertowanie wszystkich obrazków w projekcie do webp

Całość można załatwić jednym skryptem , uruchamianym w folderze projektu

find . -name "*.png" | sed 's/\.png$//1' | while read image; do if [ -e "$image.webp" ]; then continue; fi; cwebp -lossless "$image.png" -o "$image.webp"; done;
find . -name "*.jpg" | sed 's/\.jpg$//1' | while read image; do if [ -e "$image.webp" ]; then continue; fi; cwebp -lossless "$image.jpg" -o "$image.webp"; done;

Dodaj komentarz

This site uses Akismet to reduce spam. Learn how your comment data is processed.