Page 1 of 1

What are WebP and WebM and How to Use Them?

Posted: Mon Dec 09, 2024 8:20 am
by mstlucky8072
Web pages have undergone a great evolution from past to present. While the first websites consisted of only text, images and videos were also included over time. These inevitable developments also meant huge loads for web pages. Previously expressed only in kilobytes, sizes are now expressed in megabytes.

In addition to all these developments and increasing page sizes, users also rightly want web pages to load quickly. As can be seen from the statement made by Google’s John Mueller in 2019 , site speed is definitely a ranking factor. How can we deal with these large-sized rich media formats among the many factors that affect site speed?

At its 2010 I/O conference, Google announced two new generation rich media formats: WebP for images and WebM for videos. Let's get to know them one by one.

What is WebP?
WebP is a file type that was announced by Google in 2010 and can achieve high compression rates for images without compromising quality. When you use the WebP format, images are smaller in size, but they do not compromise on quality and allow your page to load faster.



If you convert PNG files, which offer a lossless visual employment database experience as in the example you see above, to the WebP file format, you can publish images on your site at up to 26% smaller sizes without compromising image quality. So let's take a look at what this lossy and lossless compression is.

Image


Lossless compression (WebP-Lossless): This means that every pixel of your image will remain the same after compression. PNG file format presents images in a lossless manner. Similarly, WebP's lossless compression (Webp-lossless) method can provide the same quality with a size 26% smaller than lossless compressed versions of PNG files.

Lossy compression (WebP-Lossy): This is a format where you can achieve greater compression by removing pixels from your images that are too small for the user to see with their eyes. When we compare this format to the popular lossy file compression format JPEG, we see a 25% to 34% reduction in file size.

What are the advantages of using WebP?
As we mentioned above, smaller file sizes will help your website open faster. In this way, you will have made a beneficial move for both your users and Google.

This advantage increases exponentially for owners of e-commerce category pages with lots of images or a blog site where photos are predominant.

With the WebP file format, you don't have to use different visual formats in different areas of your website. Usually, logos are published in PNG format and photos are published in JPG format. These file formats take up a lot of disk space and you will receive the following warning in the Google Pagespeed insight report.



If you examine Google's WebP gallery, you will see how profitable it is.

What are the disadvantages of using WebP?
This file format, gifted to us by Google, also brings with it a problem. As you can see below, the most popular web browsers support the WebP format and display it without any problems, but it is not supported by Safari and Internet Explorer (Edge supports it).



So is there a solution to this situation? Of course there is. Let's take a look.

How can I use WebP files?
You can present images to the user by looking at which browser the user is using. If the user is using Safari, your server will send PNG or JPEG images to the user. In other browsers, WebP images will continue to be displayed. For example, you can use plugins to use WebP in Wordpress. You can click here for plugins .

If you are not using Wordpress, your developer needs to do an integration for this issue. As you can see below, you can include both in HTML. Your browser will try to download the WebP image if possible. You can click here to get more information about this feature that comes with HTML 5 .