Skip to content

Instantly share code, notes, and snippets.

@schellenbergk schellenbergk/

Last active Feb 23, 2019
What would you like to do?
# usage examples:
# "*.png" # convert all png's in current directory
# "icon-*.jpg" # convert all jpg's that start with "icon-"
if [ $# -eq 0 -o -z "$1" ]; then
echo "No file pattern supplied";
exit 1;
for file in $1
echo "Converting $file";
cwebp -q 80 "$file" -o "${file%.*}.webp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.