Skip to content

Instantly share code, notes, and snippets.

@cjimmy
Created October 6, 2022 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjimmy/ca4cc741d71a102c96dfd82180ad2dc3 to your computer and use it in GitHub Desktop.
Save cjimmy/ca4cc741d71a102c96dfd82180ad2dc3 to your computer and use it in GitHub Desktop.
convert image to webp with right-click
# why we had to add it to our .bash_profile
source ~/.bashrc
for FILE in "$@"
do
echo "converting file: $FILE"
EXT=${FILE##*.}
QUALITY=85 # quality of output image (You can change this: 1-100)
cwebp -q $QUALITY "$FILE" -o "${FILE/%.$EXT/.webp}"
done
@cjimmy
Copy link
Author

cjimmy commented Oct 6, 2022

Screen Shot 2022-10-06 at 5 36 28 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment