↓ Skip to main content
  1. Posts/

WebP, that great unknown

Rubén Infante Docio
Author
Rubén Infante Docio
Software engineer
Table of Contents

Note (2026): This article reflects the situation when it was written. Today WebP works in all current browsers, so most sites no longer need these solutions.

Introduction
#

WebP is a new image format that offers lossy and lossless compression for images on the web:

  • Lossless WebP images take up 26% less space than PNGs.
  • Lossy WebP images are 25% to 34% less expensive than JPEGs with an equivalent SSIM index.
  • Supports lossless transparency (also called alpha channel) with only 22% additional bytes.
  • Transparency also works with lossy compression, and typically results in files 3 times smaller than PNG when loss is acceptable on the red, green, and blue channels.

Despite this, WebP is not a widely used format today, probably because Internet Explorer and Firefox do not support it. But we have options that can solve it both on the client and on the server. Let’s take a closer look.

In the client
#

If our processing capacity and storage on the server is limited, we can leave this process to the browser with libraries such as WebPJS.

On the server
#

We can also perform the necessary operations on the server:

  • Apache or NGINX: we can use PageSpeed, which is capable of serving pages with or without WebP depending on the browser that makes the request.
  • C#: ImageProcessor is capable of performing conversions between formats on the fly. Google itself also explains how to work with WebP in C#.

Conclusion
#

This format is, in my opinion, the best image format currently available, and browsers such as Firefox should include support, since its license is free (BSD). Internet Explorer should also incorporate it, although, as a private company is responsible, it is free to make mistakes and, although it should, it does not have to answer to the community.

Related