← Back to blog

By the ImageOpti team ·

What Is WebP and Should You Use It?

WebP is an image format from Google that is often smaller than JPG and PNG. Learn how it works, where it is supported, when to use it and when to stay with JPG.

WebP is an image format created by Google that can store photos and graphics, with or without transparency, in files that are often smaller than the equivalent JPG or PNG. You should use it for images on your own website, where smaller files mean faster pages, and stay with JPG or PNG for email, print and anywhere you are not sure the receiving software can open WebP.

That short answer hides a few details worth knowing, such as how WebP gets its savings, what it cannot do, and what happens when a file will not open. This article walks through those so you can decide with confidence.

What WebP actually is

WebP is a file format, just like JPG, PNG or GIF. Google released it in 2010 and has developed it since. The aim was to make images on the web lighter so pages load faster and use less data.

Its main trick is flexibility. Where older formats each do one job, a single WebP file can be any of these:

  • A lossy photo, similar in purpose to a JPG.
  • A lossless image, similar in purpose to a PNG.
  • An image with transparency, in either of the modes above.
  • An animation, similar in purpose to a GIF.

If the terms lossy and lossless are new to you, lossy vs lossless compression explained covers them from the beginning. In short, lossy files discard a little detail to get much smaller, while lossless files keep every pixel exactly.

How much smaller are WebP files?

Often smaller, but the amount varies by image. Published comparisons, including Google's own, report that lossy WebP photos are commonly in the region of a quarter to a third smaller than JPG at a similar level of visual quality, and that lossless WebP graphics are often noticeably smaller than PNG. Those are typical ranges from published tests, not promises. Some images save a great deal, some save very little, and a few come out larger.

An example with simple arithmetic helps show what is at stake. Suppose a page has 10 photos, each 200 KB as a JPG, so 2,000 KB in total. If the WebP versions are 25 percent smaller, each is 150 KB, so the total is 1,500 KB. That is 500 KB saved on a single page, which is meaningful for a visitor on a slow mobile connection, although not dramatic on its own. The savings add up across a shop with hundreds of product photos.

The first thing to check, though, is the pixel size of the image. A photo that is 4000 pixels wide and shown at 800 wastes far more than any format change can recover. Resize first with the Resize tool, then think about format.

How WebP achieves smaller files

You do not need the maths, but a rough picture helps.

Lossy WebP is based on techniques from video compression. It predicts what each block of the picture should look like based on neighbouring blocks, then stores only the differences. Because it models pictures with more modern methods than JPG, which dates from the early 1990s, it can usually reach the same look with less data.

Lossless WebP uses its own set of tricks, such as reusing colours and patterns it has already seen in the image, to pack the data tightly without losing anything.

Both modes handle transparency, with a smooth range of partly transparent pixels, which is how soft shadows and feathered edges are stored.

Where WebP is supported

All current major browsers, including Chrome, Firefox, Edge and Safari, can display WebP images. That covers the great majority of visitors to a typical website today. Safari was the last of the big four to add support, and visitors on very old browsers or operating systems may not be able to see WebP images.

The more common problems are outside the browser:

  • Older image editing programs may not open WebP files.
  • Some email clients and messaging apps handle them poorly.
  • Many print shops and photo labs do not accept them.
  • Some upload forms, such as job application portals, marketplaces and government sites, only accept JPG, PNG or PDF.
  • Some content management and website builder plugins need updating before they accept WebP.

If you save an image from a website and discover it is a WebP, that is why. Right-click saving gives you whatever format the site used, which may be WebP even though you expected a JPG.

What WebP cannot do (or does worse)

  • Very large images. WebP has a maximum dimension of 16,383 pixels on either side. That is far beyond what a website needs, but it matters for huge panoramas.
  • Fine colour precision. Lossy WebP stores colour at a lower detail than brightness, as JPG usually does. This is generally invisible in photos but can soften bright red text or thin coloured lines.
  • Universal compatibility. JPG and PNG are still the formats that everything accepts.
  • Animated image workflows. WebP supports animation in the format, but the Convert tool on this site produces a single still frame from an animated GIF, so it is not a GIF to animated WebP converter.

When you should use WebP

  • Images on your own website, where you control the pages and audience is on current browsers.
  • Product photos and blog images, where many files add up.
  • Graphics with transparency, such as logos on a coloured background, where WebP is usually smaller than PNG.
  • Pages where speed matters, since lighter images help pages load sooner. For how that connects to Google's page experience measurements, see image optimization for Core Web Vitals.

When you should not use WebP

  • Email attachments and newsletters. Some clients may not display WebP. See how to compress images for email.
  • Print. Send JPG, PNG or whatever the print shop requests.
  • Forms with file-type rules. If it says JPG or PNG, give it JPG or PNG.
  • Files you will edit repeatedly. Keep your master in a lossless format or the original camera file.
  • Sharing with people on older software. JPG is friendlier.

How to switch to WebP

Converting a single image

Open the Convert tool, add your image, and choose WebP as the output format. It accepts JPEG, PNG, WebP, GIF and BMP files up to 20 MB each, and runs in your browser, so your images are not uploaded. You can process a batch and download everything as a ZIP.

The tool does not offer a quality setting for lossy output and uses the browser's default, which is generally high quality. If you want to choose a quality level yourself, convert first, then use the Optimize tool, which accepts WebP and has a quality slider (default 75) and a before and after comparison.

What happens to transparency

PNG files with transparent backgrounds keep their transparency when converted to WebP. If you convert to JPG instead, transparent areas become white.

Avoid converting from a low-quality source

Converting a heavily compressed JPG to WebP does not restore lost detail. It can even add a second layer of lossy damage. Where possible, convert from the original file or a high-quality version.

Should you serve both WebP and JPG?

Developers sometimes provide both so that old browsers fall back to JPG. That is a reasonable approach for large sites. For a small business site, WebP alone is generally fine today, since visitors on browsers that cannot display it are now a small minority. If your analytics show many visitors on very old systems, or you want to be cautious, keep JPG for important images such as your main banner.

If you use a platform like WordPress, Shopify or Squarespace, check what it does with uploads. Some platforms already create WebP versions automatically, in which case uploading a clean, correctly sized JPG may be all you need to do.

WebP and newer formats

AVIF is a newer format that can compress even more than WebP in many cases, but it has its own trade-offs, such as slower encoding and different support. The article on AVIF vs WebP vs JPEG compares them. For now, WebP is a practical middle ground: better than JPG for most web uses, with wider support than the newest formats.

Frequently asked questions

Is WebP better than JPG?

For websites, it is often better because files are smaller at similar quality. For compatibility with email, print and older software, JPG is still safer.

Does WebP lose quality?

It can, since it has a lossy mode. In lossless mode, nothing is lost. At sensible quality settings, the loss from lossy WebP is usually not visible.

Why do images I save from websites come out as WebP?

Many sites serve WebP because it loads faster. When you save the image, you get the same format. Convert it to JPG or PNG if you need to use it elsewhere.

Can I open WebP files on my computer?

Current versions of major browsers open them, and recent versions of Windows and macOS can open them in their built-in viewers. Older software may not. If you cannot open one, convert it to JPG or PNG.

Does WebP help SEO?

Smaller images make pages faster, and speed is one of many things search engines consider. WebP alone will not change your rankings, but it can help you get your image weight down.

Can WebP be animated?

Yes, the format supports animation. The Convert tool on this site does not create animated WebP, because it turns a GIF into a single still frame.

Related guides

For more on formats, see the image conversion guide. To try it, convert an image to WebP.