What is .webp File Format? How to Convert Images to it?

WebP File Format Explained: is it Better Than JPEG?

Updated: March 9, 2023 Author: Andrey Isaev

Does .webp have advantages over JPEG and other formats? Where is it used most? Is it time to migrate all your photos into WebP? Here you will find all the answers.

What is a .webp file?

WebP is the format for storing digital images that is developed by Google as a modern replacement for other image formats common on the Internet, such as JPEG, PNG and GIF. It is currently supported by all modern browsers.

Detailed information about format

The format appeared relatively recently - its first version was announced in 2010. It combines the main advantages of all the most popular image formats used on the Internet:

  • Just like JPEG allows you to compress photos very efficiently using lossy compression algorithm, only better.
  • Just like JPEG allows you to store metadata inside files (such as GPS location of the shot, camera parameters, etc.) in ICC, XMP and EXIF formats.
  • Just like PNG and GIF can compress images without loss of information, only better.
  • Just like PNG allows the image to have transparency.
  • Just like GIF can be used for animated pictures.

An important property of this format, which greatly contributed to gaining popularity, is its openness. Google published the source code of the library of support for this format under a very liberal open source license (BSD). In addition, Google did not register any patents for the algorithms.

As part of the compression algorithm, WebP is using prediction of the not yet unpacked part of the image based on the already known. This mechanism is one of the things that helped algorithm to achieve better results when compressing images compared to JPEG.

Where is the WebP format used?

Thanks to its openness, the support of the format was relatively quickly added to all leading web browsers. At the moment, all modern browsers support this format. And since the images compressed by WebP occupy at least 25% less space than JPEG of similar quality, webmasters around the world are actively adopting this format to improve the page load speed of their web sites.

However, outside the internet, the WebP format has not yet been able to take the leadership position from the traditional JPEG as the format for storing photographs by default. New cameras and phones (with just a small number of exceptions) continue to save pictures in JPEG format (and, possibly, one or another RAW format).

WebP vs JPEG: Which is better?

A number of studies show that photographs saved as WebP occupy from 25% to 34% less space than JPEG with the same visual quality of the resulting picture. Also, at the extreme degree of compression, WebP artifacts look much more natural, as shown in the example below. At the same time, WebP also allows you to save metadata in XMP and EXIF formats, and also has a transparency feature. It turns out that Webp is at least no worse, and in several aspects is noticeably better than JPEG. So why has it still not replaced the older format everywhere?

Artifacts of extreme image compression in JPG format - checkered background
2,3 Кb JPEG - checkered background
Artifacts of extreme compression of a Webp image - smoother background
1,7 Kb WebP - smoother background

The thing is, Webp is not the only contender to become a "new JPEG" in the future. A serious struggle unfolded in this segment, and it is far from the end, since the creators of the formats are constantly working on their improvement.

Among the main competitors for the right to be “the next JPEG” should be mentioned HEIC, whose popularization is backed by Apple, that made it the default format for pictures on its smartphones, as well as AVIF developed by Alliance for Open Media. Data on which of the formats gives a higher compression quality is somewhat diverge in different sources, especially since all formats are actively developing. However, it seems to be believed that both of these formats surpass WebP in terms of compression, while AVIF is showing slightly better results.

Nevertheless, with regard to the Internet, WebP has already occupied its niche tightly. HEIC licensing policy does not help its popularity in this segment in any way, while AVIF turned out to be less universal than WebP. In particular, it does not support transparency, which is very important for web design.

WebP vs PNG: Which is better?

Although JPEG is perceived by many as the "best format for all pictures", it actually is not. It indeed takes a leading place, but only in a specific segment - in digital photographs. Here it really shines - it allows you to compress the images very strongly, and the inevitable loss of information is not perceived by the eye as a deterioration in the image quality. This equally applies to more modern lossy compression algorithms, such as WebP, HEIC or AVIF.

However, there is a whole class of images for which PNG gives much better results, such as black and white graphics, or text.

JPEG compression artifacts on B/W image No artifacts on BW image with PNG compression

WebP was conceived as a universal algorithm that can do not only lossy compression, but also lossless, to be able to compete with PNG. In lossless mode it is free from compression artifacts like in the picture above. However, there are still types of images where good old PNG shows 2-3 times better compression rate than new WebP, therefore it does not seem that PNG will be completely extinct any time soon.

WebP vs GIF: Which is better?

GIF is a very old image format with many disadvantages, and therefore it is practically not used as a format for storing individual images. Its main advantage, for which it is still appreciated and used widely - the ability to encode not one, but a whole series of images to make animation. However, today this animation is most often done by transformation from the video, and the outdated GIF compression algorithm is practically useless for such type of images. Resulting files are not so large only due to the fact that the color density of the original image is greatly reduced (to 256 colors only), as well as the number of frames per second.

WebP is much better suited for this task, its lossy compression algorithm will compress frames of the video much better, while visually the image will look more natural due to the use of a full RGB for color coding.

The main reason why WebP has not yet replaced GIF in this niche is its relative novelty. It should take a lot of time before it becomes common format for animated memes.

How to open Webp?

The vast majority of the common applications on Windows 10-11 and on macOS, including integrated into the operating system, will open .webp files without any issues. On the MacBook, the format support is built into the operating system, while in Windows, there is additional "Webp Image Extension" component from Microsoft, which comes as part of default setup.

How to convert JPEG to WebP and back?

On Windows

Conversion of JPEG to WebP or other formats on Windows 10 or 11 can be done with regular tools:

  • Open photo in Photos app
  • In the top bar, press the "..." button to bring up the menu
  • In the menu that opens, select "Save As..."
  • In the dialog that opens, select the desired format (JPEG or other) and the folder to save the new file
  • Click "Save"
Convert JPEG to WebP on Windows 10 with Photos
Convert JPEG to WebP on Windows 10 with Photos

On macOS

Transformation of JPEG to Webp on MacOS or other formats can be done using built-in tools:

  • Open photo in Preview app
  • From the menu select "File"->"Export"
  • In the dialog that opens, select the desired format (JPEG or other), compression level and folder where to save the new file
  • Click "Save"

WEBP conversion to JPEG on MacOS application Preview
WEBP conversion to JPEG on MacOS application Preview

Does it make sense to migrate your entire archive of photos from JPEG to Webp?

There is no definite answer to this question, everyone should decide for themselves. However, when making a decision, consider to the following factors:

  • The format race for "the next JPEG" is far from over. What format will come out of it as the winner - it is too early to judge.
  • The compression is achieved by loss of information. Each subsequent compression operation inevitably loses a little more information each time.
  • 18 years have passed from the appearance of JPEG to the appearance of WebP, during that time the compression quality managed to improved by roughly 30%. At the same time, the cost of a Gigabyte of a hard disk space has been constantly reducing 5-10 times in every 10 years, according to various estimates.

Taking into account the above, if we are talking about precious photographs in your family archive, which have been accumulated for decades, perhaps a small one-time gain in size does not justify risks and difficulties of such a project. Perhaps it is better paying more attention to the correct systematization of your archive, as well as deleting duplicates, which consume disk space. It will be much easier to do this if you use specialized software for Photo Archive Management like Tonfotos. It is available for free and will simplify many tasks for working with your family photo archive.