Created
May 10, 2020 17:52
-
-
Save HarshadRanganathan/4b02b21a7e3dc3a62a876bfca3c681a7 to your computer and use it in GitHub Desktop.
Lighthouse Tools
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
// convert all files to webp format with quality ratio of 80 | |
for file in img/*; do cwebp -q 80 "$file" -o "${file%.*}.webp"; done | |
// convert images based on google's recommended sampling factor, quality and interlace | |
magick mogrify -sampling-factor 4:2:0 -strip -quality 75 -interlace JPEG -colorspace RGB -format jpg *.png | |
magick mogrify -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB *.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi HarshadRanganathan,
I have no idea what I'm doing. I need to convert .jpg files to .webp using by -zsh in Terminal on a Mac laptop. This is what I entered in Terminal ////Downloads/TestImage/Test2.jpg; do cwebp -q 80 "test2.jpg" -o "${test2%.*}.webp"; done////
zsh returns this error ////zsh: parse error near 'do'////
I know nothing about programming. Any advice? Thank you.