Created
October 6, 2022 21:36
-
-
Save cjimmy/ca4cc741d71a102c96dfd82180ad2dc3 to your computer and use it in GitHub Desktop.
convert image to webp with right-click
This file contains hidden or 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
# 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 |
Author
cjimmy
commented
Oct 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment