Last active
August 9, 2023 19:23
-
-
Save JayHoltslander/d2a61d9cb82518639def452fb9278fb2 to your computer and use it in GitHub Desktop.
Bulk convert JPGs to WebP (@75%) with cwebp (https://developers.google.com/speed/webp/docs/cwebp). Source: https://www.smashingmagazine.com/2018/07/converting-images-to-webp/ Useful if you're rewriting JPGs to WebPs (https://github.com/vincentorback/WebP-images-with-htaccess)
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
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 75 $1 -o "${1%.png}.webp"' _ {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perfect just what I was looking for! Thanks