Choosing an image format used to be simple: JPG for photos, PNG for everything else. Today WebP and AVIF are supported by every major browser and can cut image weight dramatically. The right choice depends on what the image is, where it goes, and how much encoding time you can afford.
The four formats side by side
| JPG | PNG | WebP | AVIF | |
|---|---|---|---|---|
| Compression | Lossy | Lossless | Lossy or lossless | Lossy or lossless |
| Transparency | No | Yes | Yes | Yes |
| Animation | No | No (APNG separately) | Yes | Yes |
| Typical photo size, relative to JPG | 100% | 300 to 800% | 65 to 75% | 45 to 60% |
| Encoding speed | Fast | Fast | Fast | Slow |
| Browser support | Universal | Universal | All current browsers | All current browsers |
| Support outside browsers | Universal | Universal | Good | Improving |
The percentages are typical ranges for photographs at a similar visual quality. Actual results depend heavily on the image: smooth gradients compress very well in AVIF, while fine noise and texture narrow the gap between formats.
File size: a typical comparison
To make the numbers concrete, here is what a typical 1600 x 1067 pixel photo of a person outdoors looks like in each format at settings that look the same on screen:
| Format and setting | Typical file size |
|---|---|
| PNG (lossless) | 2 to 3 MB |
| JPG, quality 85 | 280 to 380 KB |
| WebP, quality 80 | 190 to 260 KB |
| AVIF, quality 60 | 130 to 190 KB |
For a page with ten such photos, switching from JPG to WebP saves around 1 MB, and AVIF saves a little more on top of that. On a phone connection, that is a noticeable difference in how quickly the page appears.
Quality: where each format struggles
Every lossy format removes detail in its own way, and the artefacts look different:
- JPG shows blocky squares and ringing around sharp edges at low quality. It handles natural texture well.
- WebP tends to look slightly smoother and can soften fine texture, such as fabric or foliage, at low settings.
- AVIF is excellent with gradients and skies, but at very low settings fine detail can look painted or smeared.
- PNG never loses detail, which is why it suits text and interface graphics, and why its files are large.
At sensible settings, JPG 85, WebP 80 or AVIF 60, all three lossy formats look the same to most viewers at normal size.
Speed: encoding versus loading
File size controls how fast an image downloads. Encoding speed controls how long it takes to create the file. AVIF is the slowest to encode by a wide margin, often several times slower than WebP. That rarely matters for a single blog image, but it matters for:
- Sites that generate images on the fly for every visitor.
- Large batch conversions, such as a product catalogue with thousands of photos.
- Tools that run in the browser on older phones.
Decoding, the work a visitor's device does to display the image, is fast for all four formats on modern hardware.
Which format to use where
| Use | Best choice | Why |
|---|---|---|
| Photos on your website | WebP (or AVIF) | Smallest files with full browser support |
| Logos and icons | SVG, or PNG / lossless WebP | Crisp edges, transparency |
| Screenshots with text | PNG or lossless WebP | Text stays sharp |
| Social media uploads | JPG | Platforms re-encode everything anyway |
| Email and upload forms | JPG | Accepted everywhere |
| Open Graph link previews | JPG | Most reliable across platforms |
| Printing | JPG at high quality, or TIFF | Print services expect them |
For most websites, WebP is the practical default: it is fast to create, small, and supported everywhere that matters. AVIF is worth adopting where image weight is critical and your tools encode it comfortably.
Whatever you choose, be consistent. A site that serves every photo as WebP at a similar quality setting is easier to maintain, easier to audit and more predictable in speed tests than one that mixes formats image by image. Decide on one default for photos and one for graphics, write it into your publishing checklist, and convert older images to match when you update a page.
Serving modern formats with a fallback
If you want AVIF or WebP on your site but still need to support very old browsers or software, the HTML picture element lets the browser choose. List the most efficient format first and a JPG last:
<picture>
<source srcset="/images/photo.avif" type="image/avif">
<source srcset="/images/photo.webp" type="image/webp">
<img src="/images/photo.jpg" width="1600" height="1067" alt="Portrait in natural light">
</picture>
Each browser downloads only the first format it supports, so nobody pays for files they cannot use. Many content management systems and image CDNs do this automatically.
Browser and platform support
Support is the main reason JPG and PNG are still everywhere, even though newer formats compress better.
| Format | Modern browsers | Email clients | Social platforms | Windows and macOS |
|---|---|---|---|---|
| JPG | All | All | All | Yes |
| PNG | All | All | All | Yes |
| WebP | All current versions | Mixed | Most accept, some convert | Yes, in current versions |
| AVIF | All current versions | Poor | Limited | Partial |
For websites, WebP is safe to use without a fallback today. AVIF is supported by all current major browsers too, but some older devices and tools still struggle with it, so many sites serve it with a WebP or JPG fallback. For email newsletters, JPG and PNG remain the safest choice.
Which format for which job
Format choice depends less on the format and more on the image and where it will appear.
| Job | First choice | Second choice | Avoid |
|---|---|---|---|
| Photos on a website | WebP | AVIF with fallback | PNG |
| Logos and icons | SVG | PNG or lossless WebP | JPG |
| Screenshots | Lossless WebP | PNG | Low quality JPG |
| Email newsletters | JPG | PNG | WebP, AVIF |
| Social media uploads | JPG | PNG | AVIF |
| Printing | JPG at high quality or TIFF | PNG | WebP |
| Animated images | Animated WebP or video | GIF | Large GIF |
A useful habit is to separate "working" formats from "publishing" formats. Keep originals in a high quality format, then export to WebP or AVIF only for the website, and to JPG for everything else.
Encoding settings that matter
Two images in the same format can differ greatly in size depending on how they were saved.
- Quality. The main control for lossy formats. For WebP, 75 to 85 is a good range for photos. For JPG, 75 to 85. AVIF uses a different scale, where values around 50 to 65 often look similar.
- Effort or speed. WebP and AVIF encoders can spend more time looking for savings. Higher effort gives smaller files at the same quality, but takes longer to encode.
- Chroma subsampling. Reduces colour detail to save space. It is fine for photos but can blur red or blue text.
- Metadata. Camera data and colour profiles add weight. Strip what you do not need, but keep the colour profile if colours matter.
A real-world test you can run
To choose for your own site, take five typical images: two photos, a screenshot, a logo and a graphic with text. Export each one as JPG, PNG, WebP and AVIF at sensible settings, then compare the file sizes and look at them side by side at 100% zoom. The results will reflect your actual content, which is more useful than general figures. Most sites find that WebP cuts their photo weight by a quarter to a third compared with JPG, and that PNG screenshots shrink considerably as lossless WebP.
The JPG to WebP converter is a quick way to run this test on photos without installing software.
Formats you may still meet
A few other formats still appear in everyday work. GIF remains common for short animations, though animated WebP or a small video file is usually far lighter. TIFF is used in printing and archiving, where very high quality matters more than file size. HEIC comes from iPhone cameras and usually needs converting to JPG before sharing. SVG is a vector format for logos and icons, which scales to any size without losing sharpness.
None of these replace the four main formats for everyday web publishing, but knowing when they appear makes it easier to choose the right conversion. A TIFF from a photographer, for example, should be converted to WebP for the website and kept as the master file for print. A GIF from a designer can often be converted to animated WebP with a large saving, and the HEIC to JPG converter handles iPhone photos.
When in doubt, keep a high quality original and generate the web formats from it, so you can switch formats later without any extra loss.
For most sites, the practical answer is short: WebP for photos, SVG for logos, lossless WebP or PNG for screenshots, and JPG wherever another system needs a file it can open without trouble.
Converting your existing images
If your site still serves PNG photos or large JPGs, converting them is one of the quickest performance wins available. The PNG to WebP converter keeps transparency and typically reduces PNG files by 25 to 80 percent. The JPG to WebP converter cuts photos by about a quarter to a third with no visible change.
Convert PNG to WebPAny size, free, runs in your browserOpen toolKeep your original files as masters, convert copies for publishing, and check a few images side by side at full size before replacing them across the site. If you ever need a JPG or PNG again, you can always export it from the original.
Frequently asked questions
Is AVIF better than WebP?
AVIF usually produces smaller files at the same quality, especially for photos. It is slower to encode and has slightly less support in older software, so WebP remains the safer everyday choice.
Should I still use JPG?
Yes, where compatibility matters most: email attachments, upload forms, printing and older software. For images on your own website, WebP or AVIF loads faster.
When should I use PNG?
For logos, icons, screenshots and graphics with sharp edges or transparency when you need exact pixels. For photos, PNG files are far larger than necessary.
Do all browsers support WebP and AVIF?
All current versions of Chrome, Edge, Firefox and Safari support both WebP and AVIF. Very old browsers may not, which is why some sites still provide a JPG fallback.







