We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Observer • 2 years ago

Thanks - but why would you not include the script as a copy-paste'able text?

Michael D • 4 weeks ago

Thanks for creating this! For anyone who wants to just copy/paste instead of re-typing:
for f in "$@"
do
/usr/local/bin/cwebp -q 75 "$f" -o "${f%.*}.webp"
done

Kay • 2 months ago

https://uploads.disquscdn.c... I get 'no such file or directory'. *(The action “Run Shell Script” encountered an error: “-: line 2: /usr/local/bin/cwebp: No such file or directory
-: line 2: /usr/local/bin/cwebp: No such file or directory”)

Can you assist with that?

ISO640 • 1 month ago

type "which cwebp" to give your location, that's what worked for me.

Mallikarjun M • 6 months ago

You can use free online tools like Convert JPG to WEBP provided by the ConvertOnline.org. You can choose multiple JPG files in one go, and just click a button to convert them all to WEBP. All the images will be converted to WEBP, and would be ready for download.

Akbar • 3 years ago

Thanks for this! Would you happen to know of a script that does the reverse, webp --> jpg?

Akbar • 3 years ago

I ended up installing homebrew/imagemagick and used a similar script:

for img in "$@"; do
filename=${img%.*}
/usr/local/bin/convert "$img" -background white -flatten "$filename.jpg"
done