1) Install homebrew by opening up your terminal application and copying and pasting the following line of code in it. Then hit enter.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/.sh)"

2) Run the following command in your terminal application:

brew install imagemagick

3) Create an empty folder on your mac.

mkdir ~/Pictures/WebP

4) Navigate to the folder of png or jpg images you want to convert to WebP in your terminal.

cd ~/YourImages/

5) Issue the following command replacing “.png” with the file extension of the files you need converted (the source files).

magick mogrify -format webP -path ~/Pictures/WebP/ *.png

6) To change the quality of your images using lossless compression, you can use the “-quality” and “-define” arguements like so…

magick mogrify -format webP -quality 80 -define webp:lossless=true -path ~/Pictures/WebP/ *.png

where -quality 80 is to reduce the quality of your images by 20% (only 80% of the original quality is used).

7) To use lossy compresssion with reduced quality you can use the “-define webp:lossless=false” arguement like so…

magick mogrify -format webP -quality 60 -define webp:lossless=false -path ~/Pictures/WebP/ *.png

This will reduce your image quality to 60% of the original image, but shrink the filesize of your photos tremendously. This will also make your original image quality unrecoverable since it is lossy. So don’t delete your original photos unless you are absolutely sure you don’t need them scaled up to a larger size and better quality. For website use, it is recommended that you scale down your image quality anywhere from 60%-80%, to decrease page load times and image load times. However, if you already are using small images this may not be neccessary, and your image compression and filesize (lossy or lossless) is relatively subjective depending upon what you are trying to accomplish with your website. If you desire High quality UHD or 4K photos all the time with slower load times, then stick with lossless with less compression. If you desire faster load times with lesser quality images, the oposite extreme end is to use lossy compression with more compression, which should shrink your files pretty well and prep them for quick load times on a website.

8) Wait for the images to be converted. Your newly converted images can be found in your ~/Pictures/WebP folder after its complete.

9) DONATE! If this tutorial it worked for you (which it should have), you could spread the love back and donate some change to my paypal, bitcoin address, or altcoin addresses.

PAYPAL:

BITCOIN (BTC) ADDRESS:

bc1qxsqy0nl8f2rqsgpzzr8eh3c67vz7kjr2djyku4

BITCOIN CASH (BCH) ADDRESS:

qzdkv8sz8zf57urafd8urhg7jdej6u892v3z088nvr

ETHEREUM (ETH) ADDRESS:

0x8C33CD44a083D605DBb65Ba4eC201f30Af88705c

ZCASH (ZEC) ADDRESS:

t1dxu9KN1pSYNoMNxYMzCNhcHJhGZmwPW9n

MONERO (XMR) ADDRESS:

4A2p4k6vSGviUxoZvwQkAX8VBQE6tQncmZUS5mZ8YS9cZ2BQ4cc2CZXdMVg4vtFoxh3XrXQECWm95Gq2FpyRtvFz2yNZuYy

10) FINISHED! Congratulations, you have successfully converted your images to webP format with Imagemagick on Mac OS.