How to Convert Images to Webp on Mac from Command Line

How to Convert Images to Webp on Mac from Command Line.

Convert images to webp on Mac easily with the command lineConvert images to webp on Mac easily with the command line

Do it is advisable convert images to webp format from the Mac? Converting images to WebP provides large file dimension financial savings, typically compressing a picture as much as 70% with out dropping image high quality, so it’s comprehensible why many Mac customers and internet builders, designers, and employees would want to convert and compress images into WebP format.

While it’s tremendous straightforward to transform webp to JPG and different images file codecs on the Mac, going the opposite route is curiously absent for the time being. But with slightly command line motion, we will simply convert images like JPG or PNG to webp on MacOS.

This article is slightly superior as a result of it makes use of the command line to attain the conversion, so we’re going to imagine you’re comfy participating with the Terminal. With that mentioned, it’s not tremendous troublesome, it’s simply that the command line is unfamiliar to many customers.

You’re going to wish to put in Homebrew in your Mac operating MacOS Sonoma, Ventura, or newer. If you haven’t but put in Homebrew, do this first. HomeBrew is critical as a result of it makes putting in Google’s webp encoder tremendous straightforward on the Mac, and it’s that command line encoding instrument that we’ll be using to transform PNG, TIFF, JPG, to WebP format.

How to Convert Images to WEBP on Mac by way of Terminal

You can convert any JPG/JPEG, TIFF, PNG, or webp file to a compressed webp image using this methodology:

  1. Launch Terminal in case you haven’t completed so already on the Mac
  2. If you haven’t but put in Homebrew, do this first with these directions
  3. Assuming you’ve gotten Homebrew put in on the Mac, now we’re going to put in the webp package deal with the next Homebrew command;
  4. brew set up webp

  5. Hit return and let webp end putting in. When completed you’re prepared to start out changing images with the webp encoder from the command line. Use the next syntax to transform a picture to webp, changing check.jpg with the enter image, and check.webp with the specified filename of your transformed webp image:
  6. cwebp check.jpg -o check.webp

  7. Hit return and also you’ll shortly convert the enter image file to webp format
  8. Repeat with different recordsdata you want to convert to webp images as wanted

Convert image to webp from the command line on MacConvert image to webp from the command line on Mac

Again, your enter images recordsdata could be PNG, JPEG, TIFF, or webp. Other file codecs should not supported (but anyway) by the cwebp encoder.

If you’ve gotten a picture file that isn’t suitable with the cwebp encoder, like a GIF or PSD file, you’ll be able to convert these images to JPG or PNG straight within the Mac Finder with these directions, with Preview, or by utilizing your image conversion instrument of selection. Once the image has been transformed to a suitable format, you’ll be able to then run it by cwebp to transform and compress that image into WebP format.

Image compression with webp is actually fairly spectacular, and the instance JPG image was compressed from 175kb to only 37kb, with no discount in image high quality!

While that is using the command line to compress and convert images to WebP, as you’ll be able to see it’s not notably troublesome. Yes the Terminal is taken into account superior, however many terminal instructions should not that difficult when you learn to use them.

It’s doable (possible even?) {that a} future model of MacOS will help webp conversion natively within the Finder and inside Preview app, particularly given that you would be able to open webp recordsdata in Finder, with Quick Look, or with Preview, and you may simply convert WebP to JPG within the Finder, and you may convert webp to JPG in Preview too both as a single image and even batch conversions. Thus, going the opposite route from numerous image codecs and changing, compressing, and encoding them to WebP doesn’t seem to be some extraordinarily far-fetched fantasy.

Do you employ the WebP image format? Do you exchange image recordsdata to WebP on the Mac? Did you employ the command line methodology talked about above, or do you employ one other strategy in your webp encoding and compression? Share with us your individual WebP conversion strategies for MacOS within the feedback!

Check out more article on – How-To tutorial and latest highlights on – Technical News, Apple Products