Short answer: For most websites, WebP is the best default image format for photos: it is supported by all current major browsers and is typically much smaller than JPEG at similar quality. AVIF usually compresses even better, especially at lower file sizes, but it is slower to encode and not every tool handles it yet. JPEG remains a universal fallback. A practical setup is AVIF or WebP served automatically with a JPEG fallback, and SVG for logos and icons.
Image format sounds like a developer detail, but it is one of the few decisions that can shrink a page by a large fraction without changing a single pixel of the design. If your site still serves every photo as JPEG or, worse, PNG, switching formats is probably the most cost-effective speed improvement available. This comparison explains the practical differences between the three main photo formats and how to choose between them.
A quick history of the three formats
JPEG dates from the early 1990s and is still the most widely used photo format on the web. Every browser, camera, phone and image editor supports it. Its compression was excellent for its time but is now outperformed by newer formats.
WebP was introduced by Google in 2010, based on video compression technology. It supports both lossy and lossless compression, transparency and animation. Browser support took years to become universal; since Safari added support in 2020, all major current browsers display WebP.
AVIF is based on the AV1 video codec developed by the Alliance for Open Media and appeared around 2019. It offers stronger compression, high dynamic range and wide colour gamut. Chrome, Firefox and Safari all support it in current versions, although support arrived later than for WebP.
Side-by-side comparison
| JPEG | WebP | AVIF | |
|---|---|---|---|
| Typical file size for photos | Baseline | Typically noticeably smaller than JPEG | Often smaller than WebP |
| Browser support | Universal | All current major browsers | All current major browsers, fewer old versions |
| Transparency | No | Yes | Yes |
| Animation | No | Yes | Yes |
| Encoding speed | Fast | Fast | Slower, can be much slower |
| Tool and CMS support | Everywhere | Very broad | Growing |
| Best use | Fallback, e-mail, downloads | Default for web photos | When smallest size matters and tooling supports it |
Exact savings vary a lot with the image and encoder settings. Google’s documentation for WebP reports lossy WebP files as significantly smaller than comparable JPEGs, and independent tests generally find AVIF ahead of WebP, especially for large photos at modest quality. Test with your own images before drawing conclusions.
Image quality: where each format struggles
Smaller files are only good if the images still look right. Each format has typical weaknesses at aggressive settings:
- JPEG shows blocky artefacts and “ringing” around sharp edges and text when compressed too hard.
- WebP tends to smooth fine textures such as skin, fabric or foliage, and can shift colours slightly at low quality.
- AVIF keeps edges clean at small sizes but can blur very fine detail and grain; at high quality settings its advantage over WebP gets smaller.
For typical website photos viewed at normal size, all three look fine at reasonable settings. Differences matter most for product photography where customers zoom in, and for images with text or fine patterns.
Browser support and fallbacks
Almost all visitors today use browsers that support WebP, and a large majority support AVIF. Still, a small share of visitors use older devices, embedded browsers or corporate systems that lag behind. There are two common ways to serve modern formats safely:
- The
<picture>element. List an AVIF source, then a WebP source, then a JPEG<img>. Each browser picks the first format it supports. - Content negotiation. The server or CDN reads the browser’s
Прийнятиheader and returns the best supported format at the same URL. The response must includeVary: Acceptso caches keep versions apart.
Many CMS plugins and image CDNs handle either approach automatically, so you do not need to write the markup by hand.
Encoding speed and workflow
For a website, the time it takes to create the image matters less than the time it takes to download it, but it is not irrelevant:
- Shops with thousands of products may find AVIF conversion of the whole catalogue takes a long time and a lot of server CPU, especially on shared hosting.
- On-the-fly conversion through an image CDN hides encoding time after the first request, because the result is cached.
- Editors often cannot open AVIF files in older desktop software, so keep originals in a familiar format and convert at publish time.
What about PNG, GIF and SVG?
These formats are not really competitors for photos, but they appear on many sites and are often misused:
- PNG is lossless and great for screenshots with sharp text or graphics needing exact colours. For photographs it produces very large files; convert them.
- GIF is an old animation format with poor compression. Replace animated GIFs with a short video (MP4 or WebM) or animated WebP.
- SVG is a vector format for logos, icons and simple illustrations. It stays sharp at any size and is often tiny. Optimise SVG files to remove editor metadata.
How to switch formats on your site
- Check what you serve now. In your browser’s developer tools, filter network requests by image and look at the type column.
- Choose a method: a CMS plugin that generates WebP or AVIF copies, an image CDN, or a build step for static sites.
- Convert existing images, not only new uploads, starting with templates and the most visited pages.
- Verify delivery. Reload a page and confirm that images arrive as WebP or AVIF, with correct fallback in an older browser if you can test one.
- Keep originals. Store high-quality originals so you can re-encode later as tools improve.
Also check that social sharing still works. Some social networks and messaging apps have been slower than browsers to support modern formats in link previews, so keep the Open Graph share image as a JPEG or PNG unless you have confirmed otherwise.
Format choices for common types of websites
The right answer also depends on what kind of site you run and who maintains it.
- Brochure sites and local businesses. A handful of photos per page, edited rarely. Convert everything to WebP once, keep SVG for the logo, and you are done. AVIF adds little extra benefit for the effort on sites this size.
- Blogs and news sites. Many new images every week, uploaded by different people. Automation matters more than the format itself: choose a plugin or CDN that converts on upload so nobody has to remember.
- Online shops. Product images are the core of the page and customers zoom in. Keep high-quality originals for zoom views, serve modern formats for listing and product pages, and test that colours stay accurate, because returns caused by misleading colours cost more than a few kilobytes.
- Photography and portfolio sites. Quality is the product. Use higher quality settings, compare formats carefully, and consider AVIF for large gallery images where its compression advantage is greatest.
- Agency-built sites handed to clients. Set up automatic conversion before handover. Clients will upload camera originals, and a site that was fast on launch day can double in weight within months.
A simple decision rule
- If you want one change with minimal risk: convert photos to WebP.
- If your CMS or CDN supports AVIF with automatic fallback: serve AVIF first, WebP second, JPEG last.
- For logos and icons: SVG.
- For screenshots with text: lossless WebP or PNG, after checking which is smaller.
- For downloadable files and e-mail newsletters: JPEG, because e-mail clients have inconsistent support for modern formats.
How Site AI Audit helps
Site AI Audit measures page weight and runs Google PageSpeed for mobile on your site, so heavy images and images served in older formats surface in the speed findings together with their effect on LCP. Each finding explains the fix in plain words and is ranked against everything else the audit checks. Run a free check to see how much weight your images add.
Related reading
- Image Optimization for Faster Websites: A Practical Guide
- How to Improve Largest Contentful Paint (LCP) on Any Website
- How to Fix a Slow WordPress Site: A Step-by-Step Guide
The bottom line
JPEG is universal but heavy, WebP is the safe modern default, and AVIF is usually the smallest when your tools support it. Serve modern formats with a fallback, keep SVG for icons, and convert your existing library, not just new uploads. Measure the result on your own images, because savings vary from photo to photo.
FAQ
Is AVIF better than WebP?
AVIF usually produces smaller files than WebP at similar visual quality, particularly for large photos. It is slower to encode and slightly less widely supported by tools and older browsers. If your setup handles AVIF with a fallback, use it; otherwise WebP is an excellent choice.
Do all browsers support WebP?
All current versions of the major browsers, including Chrome, Firefox, Safari and Edge, support WebP. Very old browsers and some embedded web views may not. A fallback through the picture element or content negotiation covers them.
Should I convert PNG images to WebP?
For photographs saved as PNG, yes, the savings are usually very large. For screenshots and graphics with sharp text, compare lossless WebP with an optimised PNG and keep whichever is smaller. Keep SVG for logos and icons.
Does image format affect SEO?
Search engines can index JPEG, PNG, WebP, AVIF and SVG images. Format affects SEO indirectly through page speed and Core Web Vitals. Descriptive file names and alt text matter more for image search itself.
Will converting to WebP make my images look worse?
At sensible quality settings, most visitors will not see a difference at normal viewing size. Very aggressive compression can soften fine textures. Compare a few converted images with the originals before converting the whole library.



