October 2, 2010

How to: Convert JPEG, PNG, BMP to WebP image format

administrator No comments

Requirements: Linux

Yesterday Google introduced the new image format – WebP which aims to go head-on with JPEG with 40% smaller file size. We also did a visual comparison of the two formats which clearly showed the efficiency of WebP. Today we bring you a small tutorial on how to convert any JPEG, PNG or a BMP into a WebP image file.

Two important things:

1) The tutorial requires Linux installed on your computer because the only converter available as of now supports only Linux. Moreover, you need to know basic terminal commands. (Don’t worry though, we’ll help you)

2) The WebP images that you will be able to generate after following this tutorial will be utterly useless. Atleast for now. That’s because there are no WebP image viewer software available. So, to deal with this issue, we’ll convert the WebP image into a lossless PNG. That way, we’ll be able to ‘actually see’ what WebP conversion looks like. Let’s begin.

Convert JPEG, PNG or BMP to WebP

1) Boot into your Linux computer and open up your favorite web-browser. Download ‘webpconv‘ file from this page.

2) Store the ‘webpconv‘ file in the home folder and then open up the ‘Terminal’.

3) Type the below command and press enter:

chmod a+x webpconv

4) ‘webpconv‘ has now turned into an executable file. To simplify things, put your JPEG, PNG or BMP image also into the home folder.

5) Run the following command in the ‘Terminal’ and press enter:

./webpconv <YOUR_IMAGE>.jpg

6) Voila! A new WebP image filw will be generated in the same folder which is surprisingly smaller than the original JPEG, PNG or BMP file.

To view WebP files:

As I said earlier, due to the complete lack of WebP image viewers as of now, we will convert the WebP image in to a PNG equivalent. PNG is a lossless conversion method preserving 100% image quality.

Run the following command in the ‘Terminal’:

./webpconv -format PNG <YOUR_WEBP_FILE>.webp

The above code will generate the exact PNG rendition of the WebP file. Compare the images.


There are two options which you can specify for WebP conversion – Format and Quality. If you are converting a JPEG, PNG or BMP into WebP, you don’t need to specify the ‘Format’. As for the quality, you can specify it in the range from 1 to 100. Here’s the syntax:

./webpconv -format JPG -quality 85 <YOUR_WEBP_FILE>.webp

This tutorial is the only way to convert JPEGs, PNGs and BMPs to WebP until someone comes up with a decent GUI based tool along with support for other platforms too.

If you liked the tutorial, do us a little favor by sharing this post

Leave a Reply

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