WebP

On this page 7

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.

ComponentLossy WebPLossless WebP
Color modelYCbCr, 4:2:0 subsamplingFull RGB(A), no subsampling
Core techniqueBlock prediction and DCT-like transformPredictive transforms and backward references
Entropy codingBoolean arithmetic coderHuffman-based coding
Bit depth8 bits per channel8 bits per channel
Typical usePhotographsGraphics, logos, screenshots
Internal components of the two WebP modes

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.

ParameterTypical rangeWhat it affects
Quality factor70-85 for photosQuantization strength and file size
Method (effort)0-6, default 4Encoding speed versus compression
Alpha quality0-100Fidelity of the transparency mask
Sharp YUVOn or offColor edge accuracy after subsampling
Near-lossless0-100Small pixel changes for better lossless ratio
MetadataEXIF, XMP, ICCCopyright, camera data and color profile
Common WebP export settings and their effect

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.

FormatCompressionTransparencyMax bit depthMain role
JPEGLossyNo8-bitUniversal sharing and printing
PNGLosslessYes16-bitGraphics and exact copies
WebPLossy or losslessYes8-bitFast web delivery
AVIFLossy or losslessYes12-bitHigh-efficiency web delivery, HDR
HEICLossyYes10-bitSmartphone capture storage
GIFLossless, 256 colors1-bit8-bit paletteSimple legacy animation
WebP and neighboring formats in a photography workflow

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.

SituationRecommended formatReason
Portfolio website galleryLossy WebP, quality 80Small files, good quality, wide support
Product photo with cut-out backgroundWebP with alphaTransparency at a fraction of PNG size
Client delivery for printTIFF or high-quality JPEGWebP is not a print standard
Long-term archiveRAW plus TIFF or DNGWebP is lossy and limited to 8 bits
HDR or wide-gamut web imageAVIFWebP cannot store more than 8 bits
Choosing an output format for a given task

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.