WebP is a raster image format that supports both lossy and lossless compression, an alpha channel for transparency, and animation in a single container. In photography and image processing, it serves mainly as a delivery format for the web: a finished photograph is exported to WebP so that a page loads faster while the image still looks close to the edited original.
The format was introduced in 2010, and its lossy mode is derived from the VP8 video codec, while its lossless mode uses a separate, purpose-built algorithm. WebP is not a capture or archival format. Photographers edit in RAW, keep masters in TIFF or high-quality JPEG, and treat WebP as the final, compressed output for screens.
How WebP compresses a photograph
WebP uses two different encoders, and the choice between them determines both file size and fidelity. Lossy WebP works like a single intra-coded video frame: the image is converted to YCbCr color with 4:2:0 chroma subsampling, divided into macroblocks of 16 by 16 pixels, and each block is predicted from already decoded neighbors before the residual is transformed and quantized.
The key gain over baseline JPEG comes from block prediction and arithmetic entropy coding. Instead of encoding every block from scratch, the encoder transmits only the difference between a predicted block and the real one, and a boolean arithmetic coder packs those differences more tightly than the Huffman coding used in classic JPEG files. An in-loop deblocking filter then softens block edges.
Lossless WebP takes another route. It applies reversible transforms such as spatial prediction, color decorrelation and color indexing, then compresses the result with LZ77-style backward references and entropy coding. Every pixel is reconstructed exactly, which makes this mode a candidate replacement for PNG in graphics and screenshots.
The table below summarizes the main building blocks of each mode.
| Component | Lossy WebP | Lossless WebP |
|---|---|---|
| Color model | YCbCr, 4:2:0 subsampling | Full RGB(A), no subsampling |
| Core technique | Block prediction and DCT-like transform | Predictive transforms and backward references |
| Entropy coding | Boolean arithmetic coder | Huffman-based coding |
| Bit depth | 8 bits per channel | 8 bits per channel |
| Typical use | Photographs | Graphics, logos, screenshots |
Key encoding parameters
WebP encoders expose a small set of parameters that control the balance between file size, visual quality and encoding time. The most important is the quality factor from 0 to 100, but it is not interchangeable with a JPEG quality value of the same number, because the two scales are defined by different quantization tables.
The following table lists the settings that matter most when exporting photographs.
| Parameter | Typical range | What it affects |
|---|---|---|
| Quality factor | 70-85 for photos | Quantization strength and file size |
| Method (effort) | 0-6, default 4 | Encoding speed versus compression |
| Alpha quality | 0-100 | Fidelity of the transparency mask |
| Sharp YUV | On or off | Color edge accuracy after subsampling |
| Near-lossless | 0-100 | Small pixel changes for better lossless ratio |
| Metadata | EXIF, XMP, ICC | Copyright, camera data and color profile |
For most web photographs, a quality setting near 80 combined with a higher effort level gives files that are visually indistinguishable from the source at normal viewing size. Embedding the ICC color profile is essential when the image is not in sRGB, otherwise browsers may display shifted colors.
WebP compared with other image formats
WebP sits between legacy formats such as JPEG and PNG and newer formats such as AVIF and HEIC. At equal perceived quality, lossy WebP files are commonly about 25 to 35 percent smaller than JPEG, although the real saving depends on image content, encoder version and the quality metric used. Lossless WebP files are typically around a quarter smaller than optimized PNG files.
| Format | Compression | Transparency | Max bit depth | Main role |
|---|---|---|---|---|
| JPEG | Lossy | No | 8-bit | Universal sharing and printing |
| PNG | Lossless | Yes | 16-bit | Graphics and exact copies |
| WebP | Lossy or lossless | Yes | 8-bit | Fast web delivery |
| AVIF | Lossy or lossless | Yes | 12-bit | High-efficiency web delivery, HDR |
| HEIC | Lossy | Yes | 10-bit | Smartphone capture storage |
| GIF | Lossless, 256 colors | 1-bit | 8-bit palette | Simple legacy animation |
AVIF usually compresses photographs more efficiently than WebP and supports high dynamic range, but it encodes much more slowly and decoding is heavier on older devices. WebP therefore remains a pragmatic middle ground: broadly supported in current browsers, fast to encode in batch, and clearly more efficient than JPEG.
Using WebP in a photo workflow
WebP belongs at the end of the processing chain, after demosaicing, tone curve, noise reduction and output sharpening have been applied to the master file. Exporting to WebP repeatedly from an earlier WebP causes generation loss, so each version should be rendered from the RAW file or a lossless master.
The decision table below shows when WebP is the sensible choice.
| Situation | Recommended format | Reason |
|---|---|---|
| Portfolio website gallery | Lossy WebP, quality 80 | Small files, good quality, wide support |
| Product photo with cut-out background | WebP with alpha | Transparency at a fraction of PNG size |
| Client delivery for print | TIFF or high-quality JPEG | WebP is not a print standard |
| Long-term archive | RAW plus TIFF or DNG | WebP is lossy and limited to 8 bits |
| HDR or wide-gamut web image | AVIF | WebP cannot store more than 8 bits |
Batch editing tools and image servers often generate WebP automatically alongside a JPEG fallback. Serving both through content negotiation or a picture element lets a browser pick the format it supports, which protects older clients without sacrificing the gains elsewhere.
Limitations and common mistakes
The most serious limitation for photographers is the 8-bit depth ceiling, which can produce banding in smooth gradients such as skies or studio backdrops, especially after heavy compression. The mandatory 4:2:0 chroma subsampling in lossy mode can also blur fine color edges, for example red text or saturated fabric patterns.
- Equating quality numbers with JPEG: a WebP quality of 75 does not match a JPEG quality of 75; compare files visually instead.
- Stripping the color profile: removing ICC data from Adobe RGB or Display P3 images leads to dull or shifted colors.
- Losing EXIF and copyright data: many converters drop metadata by default, which removes authorship information.
- Using WebP as a master: lossy recompression accumulates artifacts and discards editing latitude.
- Ignoring software support: some desktop viewers, older editing tools and print labs still handle WebP poorly.
These issues are manageable with careful export settings, but they explain why WebP is a distribution format rather than a replacement for RAW, TIFF or high-quality JPEG in the archive.
The short version
WebP is a way of saving a picture so that it takes up less space on a web page. Think of it as packing a suitcase more cleverly: the same clothes fit into a smaller bag, so the trip is lighter.
A photographer finishes editing a photo first and only then saves a WebP copy for a website. The picture loads quickly and still looks sharp on a screen. The original, full-quality file stays safely in the archive, because WebP is meant for showing, not for storing.
Where it makes a difference
A wedding photographer publishes a gallery of 60 images on a portfolio site. Exported as JPEG at quality 85 and 2,048 pixels on the long edge, the photos average about 650 KB each, so the gallery page weighs close to 39 MB and loads slowly on mobile networks.
The photographer re-exports the same edited masters as lossy WebP at quality 80, effort level 6, with the sRGB profile and copyright metadata embedded. The files now average roughly 430 KB, a reduction of about one third, and the photographer checks skies and skin tones at 100 percent for banding before uploading.
The outcome is a noticeably faster gallery with no visible quality loss at normal viewing size. JPEG versions remain available as a fallback for older software, and the RAW files and TIFF masters stay untouched in the archive.