The short answer
WebP is an image format created by Google. It can compress photos with loss, like JPG, or without loss, like PNG, and it supports transparency and animation. For websites it usually wins, because the files are smaller and pages load faster. To start, convert PNG to WebP or convert JPG to WebP.
What WebP is
Google released WebP in 2010, based on technology from its VP8 video codec. One format covers what used to need three: lossy compression for photos, lossless compression for graphics, and an alpha channel for transparency, plus animation as a replacement for GIF. A single file type that does all of this keeps a site simpler.
How much smaller is WebP
| Compared with | Typical saving | Notes |
|---|---|---|
| JPG | 25 to 35 percent | At similar visual quality, according to Google |
| PNG, lossless | About 25 percent | Same pixels, smaller file |
| PNG, lossy WebP | Often 60 to 90 percent | Screenshots and photos saved as PNG gain the most |
| GIF, animated | Often far smaller | Also supports more than 256 colors |
These are typical figures. Flat logos with few colors shrink less, and very noisy photos shrink differently. Always compare the result with the original.
Where WebP works
| Where | WebP support |
|---|---|
| Chrome, Edge, Firefox, Opera | Yes, open and create |
| Safari, iPhone and Mac | Opens WebP on current versions. Creating WebP from a web page may not be supported |
| Android | Yes |
| Windows and macOS apps | Recent versions of the built-in viewers open it, older ones may not |
| Photoshop, Word, PowerPoint | Recent versions open it, older versions do not |
| Email clients, print shops, upload forms | Often not accepted, they ask for JPG or PNG |
How to convert PNG or JPG to WebP
- In your browser: PNG to WebP and JPG to WebP. Nothing is uploaded.
- Many files: bulk PNG to WebP takes a whole folder and gives one ZIP.
- To a size limit: convert PNG to WebP to a target size.
- Command line:
cwebp -q 80 photo.png -o photo.webpfor lossy, orcwebp -lossless logo.png -o logo.webpfor lossless. - Design tools: GIMP and recent versions of Photoshop export WebP.
Choosing lossy or lossless
- Lossy at quality 75 to 85: photos, product images, backgrounds, screenshots with gradients.
- Lossless: logos, icons, pixel art and graphics with hard edges and few colors.
Add WebP to a web page with a fallback
All current major browsers display WebP, so a fallback is only for very old browsers and other tools that read your page. The picture element handles it:
<picture>
<source srcset="photo.webp" type="image/webp">
<img src="photo.png" alt="Describe the picture" width="1200" height="800">
</picture>
Always set width and height so the page does not jump while the image loads, and add a clear alt text. Do not lazy load the main image at the top of the page, because that delays the largest paint.
WebP and search rankings
Search engines do not rank a page higher for using WebP as such. The benefit is indirect: smaller images make the page load faster, which helps the Core Web Vitals, especially Largest Contentful Paint, and improves the experience on slow connections. Images in WebP can also appear in Google Images. Keep descriptive file names, alt text and a sensible display size, which matter more than the format.
When not to use WebP
- Files you send to people who may open them in old software, print shops or forms. Use WebP to JPG or WebP to PNG.
- Master files you will edit again. Keep the PNG or the original photo.
- Email signatures and newsletters, where some clients do not show WebP.
How to open a WebP file
Drag it into any current browser. On a recent Windows or Mac the built-in viewer may also open it. If a program refuses it, convert it. The WebP vs JPG guide covers the people who received a WebP by accident, and the JPG vs WebP guide compares the formats for a website.
Checklist
- Own website? Serve WebP, keep the PNG or JPG original.
- Need transparency? WebP and PNG both have it, JPG does not.
- Sending the file to someone else? JPG or PNG is the safe choice.
- Photos from an iPhone in another format? See HEIC to JPG.
Make your WebP files now. Convert PNG to WebP in your browser, one file or a whole folder, with nothing uploaded.