Last active
June 9, 2020 19:13
-
-
Save JayHoltslander/05cab870ef701e909f0ff2a5f68bb6d6 to your computer and use it in GitHub Desktop.
Batch convert images in current folder to webp format using Google's cwebp tool.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cwebp Docs: https://developers.google.com/speed/webp/docs/using | |
find ./ -type f -name '*.png' -exec sh -c 'cwebp -q 75 $1 -o "${1%.png}.webp"' _ {} \; && | |
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 75 $1 -o "${1%.jpg}.webp"' _ {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment