Techxplus

Menu
  • Apple +
    • MAC
  • Gadgets +
  • Google +
  • How-To
  • Reviews +
  • Seo
  • Tech Tips
  • Web Tools +
  • Wordpress +
Home
How-To
Convert to webp image format in a single click
How-To

Convert to webp image format in a single click

Subhro October 7, 2019

What is Webp?

webp is one of the newest image format developed by Google. It combines the compression ability of jpegs with quality and transparency retention of PNG and allows us to make high quality transparent or non-transparent images that are very small.

webp-image

WebP has significantly smaller file sizes than its alternatives even with all of these features and has been found to reduce the file size by almost 30%.

Major web browsers like Google Chrome natively support WebP while Mozilla has announced plans to implement WebP natively in Firefox.

Can I Use webp? Data on support for the webp feature across the major browsers from caniuse.com.

All graphics software like PhotoLine, Pixelmator, ImageMagick, XnView, IrfanView, GDAL and Aseprite all natively support WebP. Telegraphic has released a free plug-in that enables WebP support in Adobe Photoshop.

Converting images to webp format

To use WebP, first, you need to convert the existing images to webp format. There are various ways to convert images to webp format.

Online tools

www.squush.com – This is a website from Google from which you can convert your images to webp format. All you have to do is drag and drop an image and download the webp converted image.

Command-line tools

One of the popular command-line tools for converting images to webp format is the cwebp. We will be using the homebrew package manager to install cwebp in MAC OS cwebp is part of libwebp, and was written by the WebP team.

Homebrew is a package manager for MAC which can install lots of packages from the command line on Mac. It is the same as pip for python or yum for Linux.

To install homebrew type the below command in your terminal.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install

To know more about homebrew visit the Homebrew website

Once, homebrew is installed you can install cweb by typing brew install webp

Syntax:

cwebp [options] input_file -o output_file.webp

Usage:

After installation, We need to pass in options like the quality, input file, and output file for the command.Input file format can be either PNG, JPEG, TIFF, WebP or raw Y’CbCr.

Example:

cwebp -q 75 source.png -o output.webp

Using the MAC OS inbuilt Automator tool.

Automator is a tool in Mac Os which is designed to make the repetitive task much easier. To convert images to webp format we can use Automator which will allow us to convert the image with a single click instead of online or the command-line tool.

Please read more on – How to use Automator to save time

Initial Requirements:

The initial requirement is to have Cwebp installed and working.

Adding the lib to the path

To add the path in your ~/.bash_profile file and to do this, open the file typing the command sudo nano ~/.bash_profile. Then paste the below path in the file.

PATH=$PATH:"/usr/local/bin"
export PATH

To convert images to another file type with Automator, follow these steps:

  1. Open Automator or choose File➪New from the menu.
  2. Click on Quick Actions and then click Choose.
  3. Drag the Workflow receives current type to “Image files” in “finder app”
  4. Select utilities from left pane and drag and drop the “Run shell script” action into the workflow.
  5. Select the shell from the drop-down as bin bash.
  6. Change “pass input as arguments.” and paste the below lines of code into the Run Shell Script box.
source ~/.bash_profile
for FILE in "[email protected]"
do
 echo "coverting file: $FILE"
 EXT=${FILE##*.}
 QUALITY=85 # quality of output image (You can change this: 1-100)
 cwebp -q $QUALITY "$FILE" -o "${FILE/%.$EXT/.webp}"
done

webp-automator
Save the workflow with the name that you want to show up in the context menu.

Now, test by Right-clicking on an image and convert it. You should see a new image generated within a second.

Share
Tweet
Email
Prev Article
Next Article

Related Articles

Raspberry Pi
If you SSH login to multiple hosts, it becomes a …

How to setup passwordless ssh authentication?

free business email
Business email is an important aspect when it comes to …

How to create free business email and forward to your Gmail?

About The Author

Subhro

One Response

  1. Mary

    It helped me a lot. Thank you!!

    September 30, 2021

Leave a Reply

Cancel reply

Recent Posts

  • 10 Insane Free Social Media Tools 
  • 10 Insane Digital Marketing Tools
  • 5 Incredible Tools for Technical Writers
  • 10 Insane Chrome Extensions
  • “8 Day to day amazing tech gifts that help you get organized.”

Recent Comments

  • MacUser on How to paste without formatting in MAC?
  • Mary on Convert to webp image format in a single click
  • Marcelo Miguel Bazan on Change WordPress admin email
  • Marcelo Miguel Bazan on Change WordPress admin email
  • Marcelo Miguel Bazan on Change WordPress admin email

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • July 2021
  • May 2021
  • October 2020
  • April 2020
  • February 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019

Categories

  • Apple +
  • Gadgets +
  • Google +
  • How-To
  • MAC
  • Reviews +
  • Seo
  • Tech Tips
  • Web Tools +
  • Wordpress +

Techxplus

Categories

  • Apple +
  • Gadgets +
  • Google +
  • How-To
  • MAC
  • Reviews +
  • Seo
  • Tech Tips
  • Web Tools +
  • Wordpress +

Featured Posts

img 62ba1840a824c
img 62a8eadab762b
Tools for Technical Writers

LINKS

  • About Us
  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Terms and conditions
  • Contact
Copyright © 2023 Techxplus

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh