Skip to content

Instantly share code, notes, and snippets.

@brianherbert
Last active May 14, 2019 17:05
Show Gist options
  • Save brianherbert/747ff90410e6a2999e1f5eb3c0b796fc to your computer and use it in GitHub Desktop.
Save brianherbert/747ff90410e6a2999e1f5eb3c0b796fc to your computer and use it in GitHub Desktop.
Convert files to webp
for file in ./**/*.png ; do cwebp -q 80 "$file" -o "${file%.png}.webp"; done
for file in ./**/*.jpg ; do cwebp -q 80 "$file" -o "${file%.jpg}.webp"; done
for file in ./**/*.jpeg ; do cwebp -q 80 "$file" -o "${file%.jpeg}.webp"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment