ADAM DJ BRETT

How to convert JPG to WEBP in macOS

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. webp 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

Previous

What are we celebrating with the Erie Canal?

Next

How to Generate QR codes in macOS