convert-images-into-webp-for-mac

How to Install and Convert Images into WebP format on Mac

Here’s how to easily convert your images into the new WebP format on your Mac.

This is an offline method, and there is no need for you to rely on and trust any online 3rd-party services when you upload your images to them.

What are the types of image formats supported?

Only image files can be converted into WebP format. The following image file types are supported; PNG, JPEG, TIFF, WebP or raw Y’CbCr samples. Take note that animated PNG files are not supported in this conversion.

How to install and convert images into WebP format using a Mac?

Here are the steps to do so.

Installing Homebrew

First, you need to install the Homebrew application on your Mac if you haven’t.

  • Launch the Mac Terminal app by typing “Terminal” in your Spotlight Search. It is the magnifying glass icon on the top right-side of your screen.
  • Check first if you have Homebrew installed by typing the command below. A homebrew application is needed before you can install the WebP tool.
which brew

If you encounter this message that says <brew not found>, this means you do not have Homebrew installed.

If you already have Homebrew installed, skip to the Installing cwebp step.

  • To install Homebrew, copy and paste the command below into Terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • After installation, if you see this error message below, run the command below to complete the installation.
homebrew-application-update-message-in-mac-terminal
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

Installing cwebp

You must install the encoder application, cwebp, on your Mac.

The cwebp encoder compresses an image using the WebP format.

  • Use the following command to install the webp tool.
brew install webp

When completed, WebP is now fully installed on your Mac.

Converting Images into WebP formats

  • For example, to convert a JPG image into WebP format, use the command below;
cwebp -q 75 original.jpg -o converted.webp

Change <original.jpg> to your desired original image file. Rename <converted.webp> into your preferred filename, but you must keep the .webp extension at the end.

-q 75 refers to the compression rate.

If you use -q 50, you get a more reduced image size than a -q 75 compression. However, reduced image size may also result in more loss of image quality, so depending on your image quality needs, you should test the compression rate and check against your image quality. For example, if you want the best compression quality, you should use -q 100.

  • If you want a lossless image quality (one that converts itself into WebP format but yet retains all its image quality without any loss), you should use this command;
cwebp -lossless command.png -o converted.webp

To know more about compressing an image file using cWebP and all its other parameters and options, Google has a dedicated page that explains it all.

Check out this video tutorial on installing and converting images into WebP format using macOS Terminal.

What are the advantages of using WebP format?

Developed by Google in 2010, the WebP format is a strong competitor to the current image formats like JPEG, PNG and GIF.

WebP has achieved a better image compression rate, resulting in the image file being smaller in size. Moreover, WebP offers both lossless and lossy formats. Lossless compression retains all the image quality of the original file, whereas Lossy compression discards certain image data to achieve more file size reduction than Lossless compression.

Google had also stated that WebP lossless images are actually approx. 26% smaller in file size compared to PNG files and WebP lossy images are approx. 2%-34% smaller than their JPEG counterparts.

The popularity of the WebP format is increasing, with chat applications like Telegram. and Signal using it for faster sending, receiving and displaying purposes.

Web content creators like bloggers, photographers and social media influencers should consider WebP formats in addition to their usual JPEG and PNG image files. In situations where image loading speed matters, this will be where WebP formats will beat the rest of the competition with their reduced file size.

Conclusion

Installing the cwebp tool on Mac is a free, quick and easy way of converting images into the newer WebP format offline.

There is no need for internet connectivity since WebP is now installed on your laptop, and you do not have to upload your images to any online 3rd-party image conversion services.

The image conversion is due entirely via the Mac Terminal app, and through our testing, the output is very fast, almost instant, on many occasions.

WebP format is here to stay, with all major web browsers supporting it. The file size is reduced significantly yet retains much of its original quality.

Content creators like bloggers and social media influencers should consider using this newer format as it is smaller and offers both lossless and lossy formats.

Leave a Comment

Your email address will not be published. Required fields are marked *