How to convert PNG → WebP on Mac for Free?

DIY setup in 3 steps to convert any PNG to WebP with 1 click on your Mac. Free & Unlimited without compromising on quality. Using local WebP converter tool.

During Landing Pages development, I need to convert lots of PNGs to WebP format and using tools like Convert Cloud is easy but its paid now. I didn’t want to pay for converting my PNGs to WebP when there are free tools available. So I created a Quick Action on my mac using 1 such utility to convert PNG to WebP which works even better than using an online tool.

Here is how I do it in 1 click (For Free)

  1. Install webp tool on your mac, use command brew install webp
  2. Use automator to create a Quick Action.
    • Open Automator (Cmd + Space, search Automator). And create a new document.
    • Choose “Quick Action”
    • Configure the top options:
      • Workflow receives currentimage files
      • inFinder
    • In the left panel, search for “Run Shell Script”, then drag it to the workflow.
    • Use below script (it auto-converts PNGs to WebP in the same directory). Replace /opt/homebrew/bin/cwebp with the actual path to cwebp if installed differently (use which cwebp to check).
    • Select as argument in Pass input dropdown.
    • Save it as something like: Convert to WebP.
  3. Done
    • Right-click any .png file → go to Quick ActionsConvert to WebP.
A screenshot showing automator configuration for converting PNG to WebP Images.

Code for Converting PNG to WebP

for f in "$@"
do
  ext="${f##*.}"
  filename="${f%.*}"

  /opt/homebrew/bin/cwebp "$f" -o "${filename}.webp" >/dev/null 2>&1

  if [ ! -f "${filename}.webp" ]; then
    osascript -e 'display notification "Failed to create WebP file." with title "Convert to WebP" sound name "Basso"'
  fi
done

This code takes the image file you select as input, take out its name, create a new webp using command cwebp input_file.png -o output_file.webp to generate a new file.

You can also download this below file → UnZip it → Double Click to install in your Automator.

Download “Convert to WebP”

Note: You can use the webp utility on linux and windows as well, the shortcut configuration might differ based on the OS you use.


FAQs

Does it Reduce Quality of Image?

No, it doesn’t reduce quality of the image, the WebP tool we are using in this setup converts the image with highest resolution and doesn’t change the dimensions of the image.

Can it convert any type of image or just PNG?

The tool works on almost all types of images, most common image formats like PNG and JPEG are supported. But it shouldn’t have any problem converting other image formats.

Is there any limit on number of conversions?

No, this is a local tool installed on your system(not cloud based solution) so consume your local systems computing power hence free of cost.

Does it upload my images to any cloud server?

No, its a local tool converts images locally. You can convert images even when you are offline.

Does it work offline?

Yes, its a local tool so works even when you are not connected to internet.

Whats the benefit of converting PNGs & JPGs to WebP?

WebP images are lightweight as compared to PNGs & JPG/JPEGs. You should convert all the PNGs and JPGs to WebP to see a significant improvement on page speed. Google also recommends converting all images to WebPs for better page speed hence better page rank.

Share this post