ADAM DJ BRETT

Home / Blog / How to convert JPG to WEBP in macOS

In the quest for ultrafast websites and the every elusive four-hundos score in Google's lighthouse, I have recently begun to explore what are the best and fastest ways to convert JPG and PNG files to webp. Certainly I could use online tools to convert the images but then, there are concerns of course about webtools renaming files, modifying metadata, and of course having limits on them. Therefore I turned to a Mac users best friend homebrew where I found the wonderful Homebrew Formulae for webp. The tool is super easy to install and use.

  1. install homebrew
  2. brew install webp
  3. press return
  4. wait
  5. navigate to the folder that has the image you want to convert
  6. cwebp input.jpg -o output.webp
  7. press return Done

If you have a whole folder you wish to convert you can use Phil Warnath's super helpful script:

find . -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \) -exec sh -c 'cwebp -quiet "$1" -o "${1%.*}.webp"' _ {} \;

Tags : notes website

Webmentions

No webmentions yet.

Previous

What are we celebrating with the Erie Canal?

Next

How to Generate QR codes in macOS

A practical macOS workflow for generating trustworthy QR codes with Homebrew and qrencode, avoiding fragile third-party shorteners and preserving links on domains you control.