Image Formats for the Web: WebP, AVIF, JPEG, and PNG Compared
The right image format is the easiest performance win available.
Images typically account for the largest share of a web page’s total file size — often 50–80% of all the bytes a visitor’s browser has to download. Choosing the wrong image format means your visitors are downloading significantly more data than necessary, your page loads more slowly, and your Core Web Vitals scores suffer. Choosing the right format can reduce image file sizes by 30–70% without any visible quality difference, making it one of the highest-impact and lowest-effort performance improvements available.
At Xpose, we specify image formats carefully in every website build and performance audit. The landscape has changed significantly in recent years with the widespread adoption of WebP and the emergence of AVIF as a next-generation format. This guide explains what each major format is good for, how they compare in practice, and how to implement modern formats on your website without breaking compatibility with older browsers.
JPEG and PNG: The Legacy Formats
JPEG (or JPG) has been the standard format for photographs on the web for decades. It uses lossy compression, meaning some image data is discarded to achieve smaller file sizes. The degree of compression is adjustable — a JPEG at quality 90 looks nearly identical to the original, while a JPEG at quality 60 is noticeably degraded but far smaller. For photographic content, JPEG is still widely used and well-supported, but it’s been superseded by WebP and AVIF for most purposes. JPEG’s main remaining advantage is universal support across every browser and device ever made.
PNG uses lossless compression, meaning no data is discarded and the image is pixel-perfect. This makes it the right choice for images that need sharp edges, text, logos, or transparency (PNG supports an alpha channel; JPEG does not). The tradeoff is file size — PNG files are significantly larger than equivalent JPEGs for photographic content. PNG is most appropriate for logos, icons, screenshots with text, and images with flat areas of colour. For photographs, it’s almost always the wrong choice due to its much larger file sizes compared to JPEG or modern alternatives.
WebP: The Modern Standard
WebP, developed by Google, offers both lossy and lossless compression with better efficiency than JPEG and PNG respectively. A WebP image at equivalent visual quality is typically 25–35% smaller than a JPEG and 25–45% smaller than a PNG. WebP supports transparency (like PNG) and animation (like GIF), making it a versatile replacement for multiple legacy formats. Browser support for WebP is now essentially universal — all modern versions of Chrome, Firefox, Safari, and Edge support it — making it the sensible default format for most web images in 2025.
Switching existing JPEG and PNG images to WebP is straightforward. WordPress users can use a plugin like Imagify, ShortPixel, or WebP Express to automatically convert uploaded images. In custom builds, the HTML `<picture>` element allows you to offer WebP to browsers that support it with a JPEG or PNG fallback for older browsers. Image CDNs like Cloudinary or Imgix serve WebP automatically to supporting browsers. At Xpose, we use WebP as the default delivery format for all images on the sites we build, converting at upload time and serving the appropriate format based on the browser’s Accept header.
AVIF: The Next-Generation Option
AVIF (AV1 Image File Format) is the newest major image format for the web, offering even better compression than WebP — typically 30–50% smaller than WebP at equivalent quality for photographic images. AVIF achieves these gains through the more advanced AV1 codec, which was originally developed for video compression. The result is that AVIF files are dramatically smaller than JPEGs: an image that is 200KB as a JPEG might be 60–80KB as an AVIF, an enormous saving that directly translates into faster page loads.
The main consideration with AVIF is browser support, which is broad but not quite universal. As of 2025, Chrome, Firefox, and Safari all support AVIF. Edge supports it. Internet Explorer does not, but that browser is effectively dead for practical purposes. The `<picture>` element allows you to offer AVIF to supporting browsers, fall back to WebP, and fall back further to JPEG for the rare browser that supports neither. Encoding AVIF is slower than WebP, which can be a consideration on hosting with limited CPU for on-the-fly image processing. For sites where image size is a critical performance factor — portfolios, e-commerce product pages, news sites — AVIF is worth implementing alongside WebP as the primary format.
Common questions.
Should I use WebP or AVIF for my website?
Do image formats affect image quality noticeably?
What about GIF? Should I still use it?
More on web design & ux.
Want a hand putting this into practice?
Book a free, no-obligation consultation with a Norwich-based specialist.
Let's put your business in a better light.
Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.