Quick answer
Use JPEG when the receiving app requires it, PNG when you need exact decoded pixels or transparency, and WebP when the destination supports it and the exported file meets your quality and size needs. Compare files at the same dimensions before choosing.
Examples checked November 11, 2026.
Evidence and accountability: read our testing methodology, contributor profile and editorial and corrections policy. The dated examples are specific tests, not a guarantee for every file or device.
The comparison below measures encoded bytes. Page loading also depends on when the browser discovers the image, which size it requests and the cost of transfer and decoding.
WebP vs PNG vs JPG at a glance
| Question | WebP | PNG | JPG / JPEG |
|---|---|---|---|
| Compression | Lossy or lossless | Lossless | Lossy |
| Alpha transparency | Yes | Yes | No |
| Animation | Yes | APNG is possible | No |
| Photographs | Often efficient | Usually heavy for complex photos | Still practical and widely compatible |
| Screenshots / UI | Lossless WebP can work very well | Reliable lossless choice | Lossy artifacts can hurt text and sharp edges |
| Typical modern browser support | Broad in Chrome, Edge, Firefox and Safari | Universal across modern browsers | Universal across modern browsers |
| Fallback role | Usually the modern source | Lossless / alpha fallback when required | Photographic fallback when required |

What actually makes a website image fast?
A smaller file generally needs fewer bytes transferred, but file size is only one part of page performance. For an important image, especially a hero that becomes the Largest Contentful Paint element, loading also depends on how quickly the browser discovers the file, network and server timing, render delay, caching, and whether the browser received an appropriately sized resource.
That distinction matters because a 150 KiB WebP hidden behind JavaScript can appear later than a slightly larger JPEG discovered immediately in the HTML. Likewise, a 2400-pixel WebP can waste more bandwidth than a correctly sized 1200-pixel JPEG in a 900-pixel slot.
What is WebP?
WebP is a raster image format designed for web delivery. It supports lossy encoding, lossless encoding, transparency and animation. Current major browsers support WebP broadly, so old advice that treats WebP as a Chrome-only format is badly outdated.
That does not mean every WebP is smaller than every JPEG or PNG. The encoder mode, settings and source content still matter.
What is JPG?
JPG and JPEG refer to the same commonly used JPEG format family. JPEG is normally a lossy photographic format. It remains useful because it is simple, mature, broadly compatible and can produce efficient photographic files. Standard JPEG does not provide an alpha transparency channel.
What is PNG?
PNG is a lossless raster format with alpha transparency support. It remains a strong choice for assets where exact pixel reproduction, crisp UI edges or transparency matter. A photographic PNG, however, can be dramatically larger than an efficient lossy photo export.
Compare the same image as JPEG and WebP
These exports use the same decoded source at 900 × 600 with the quality parameter set to 0.85 in both encoders. The parameter has different meanings across formats, so compare visible quality yourself.
| Output | Dimensions | File size |
|---|---|---|
| JPEG quality 85 | 900 × 600 | 66,694 bytes |
| WebP quality 85 | 900 × 600 | 38,298 bytes |

Screenshot and text test
Lossless PNG or lossless WebP can suit screenshots and flat graphics. Run a comparison on your own image, especially when it contains thin lines or tiny text.
Transparency test
PNG and supported WebP can store alpha. If a target requires JPEG, composite transparency on a background before export. Open the saved output to check its edges.
What the byte comparison tells you about page speed
For this file, WebP used 42.6% fewer bytes than JPEG. Use a browser network trace on the actual page to confirm which image variant the browser requested and when it was available.
Measure image transfer and Largest Contentful Paint separately. A smaller file can help when image transfer is part of the delay. Discovery, caching, rendering and the rest of the page also affect the measured result.
Why dimensions can matter more than format
Match dimensions to the rendered slot before comparing formats. The Image Resizer can create a smaller copy while maintaining the aspect ratio.
Responsive images: srcset and sizes
Use srcset to list real source widths and sizes to describe the expected layout slot. Check the selected resource at more than one viewport width.
<img
src="photo-1200.webp"
srcset="photo-480.webp 480w,
photo-768.webp 768w,
photo-1200.webp 1200w,
photo-1600.webp 1600w"
sizes="(max-width: 1000px) calc(100vw - 56px), 900px"
width="1600"
height="900"
alt="...">
How <picture> fits in
Use <picture> when you need format negotiation or art direction. Modern WebP support is broad, so a fallback is not automatically required for every current-browser audience; it remains useful when your compatibility policy includes older clients or external software that cannot consume WebP.
<picture>
<source type="image/webp" srcset="hero-800.webp 800w, hero-1600.webp 1600w">
<img src="hero-1600.jpg"
srcset="hero-800.jpg 800w, hero-1600.jpg 1600w"
sizes="(max-width: 900px) 100vw, 880px"
width="1600" height="900"
fetchpriority="high"
alt="...">
</picture>
Should you lazy-load website images?
Use native loading="lazy" for below-the-fold images where it saves unnecessary work. Do not lazy-load the likely LCP hero. The browser should discover that important resource early. A justified fetchpriority="high" can help the browser prioritize the likely LCP image, but setting high priority on everything defeats the point.
Always reserve image dimensions with width and height or an equivalent aspect-ratio box so the layout does not jump as images arrive.
Does WebP make a website faster?
WebP can reduce transfer bytes when it produces an acceptable-looking file at the same dimensions. Test the actual page before attributing an LCP change to the file format.
What about AVIF?
AVIF is another modern raster option with strong compression and support across current major browsers. It can beat WebP on some images, but it adds another encoding/QA decision and has less historical browser depth. For a production pipeline, test AVIF against your actual source images rather than assuming a universal winner. This guide focuses on WebP, PNG and JPEG.
Which image format is best for fast website loading?
Start with an appropriately sized WebP or AVIF for photos and compare it with JPEG at a similar visible quality. Use PNG or lossless WebP when crisp screenshot text matters. Check actual download bytes and LCP on the page where the image appears.
| Scenario | Good starting point | Why |
|---|---|---|
| Hero photograph | WebP or AVIF, tested against JPEG | Efficient photographic transfer; keep compatibility needs in view |
| Legacy photographic fallback | JPEG | Mature, broadly supported and still efficient when encoded well |
| Screenshot / UI | PNG or lossless WebP | Protects sharp text and edges |
| Transparent raster | PNG or WebP with alpha | JPEG cannot preserve alpha |
| Logo / icon | Often SVG | Vector assets can scale without raster resizing |
| LCP image | Efficient format + correct dimensions + early discovery | The loading path matters as much as the extension |

A practical website image workflow
Try the JPG to WebP converter for a photo or the PNG to WebP converter for a graphic. Check transparency on the saved result.
- Start from the master. Do not repeatedly optimize an already damaged derivative.
- Choose the rendered dimensions first. Export only the pixels the layout needs, with responsive width candidates where useful.
- Choose the format by content. Photos, sharp UI and transparent artwork compress differently.
- Encode and inspect. Never trust a quality number without looking at the result.
- Keep the LCP image discoverable. Put the real source in HTML; avoid lazy loading it.
- Lazy-load below-fold imagery.
- Reserve width and height. Prevent layout shift.
- Measure the actual page. File-size wins are useful, but production LCP also depends on server, network, caching and rendering.
Common mistakes
- Converting a huge 4000px JPEG to WebP and calling the site optimized.
- Comparing JPEG Q80 with WebP Q80 as though the numeric scales mean the same thing.
- Calling PNG “slow” instead of describing a specific PNG as large.
- Treating JPEG as obsolete even when it remains a useful photographic fallback.
- Lazy-loading the above-the-fold LCP hero.
- Serving one desktop-sized source to every mobile viewport.
- Preloading every image or assigning
fetchpriority="high"everywhere. - Reporting one lab run as a universal speed result.
- Calling local lab results real-user Core Web Vitals data.
How the example was measured
We ran these exports on November 11, 2026 in Chromium 156.0.8078.79. We decoded each source, drew it at the stated dimensions, encoded it with Canvas, and reopened the output. The measurement file with settings and SHA-256 hashes records file sizes and decoded pixel counts. Run node tests/blog-examples-v498.cjs /path/to/outputs from the plugin with Playwright and Chromium installed. Encoders can differ across browser versions.
For reference, the earlier reported tables (CSV) record the previous article figures. The original inputs for those figures are unavailable. The examples above use the downloadable files shown here.
Sources
Short FAQ
Should I use WebP or JPG for a shop’s product photos?
Compare both at the same displayed size. Choose the smaller usable file after checking textures and labels, and make sure your storefront accepts it.
Is WebP better than JPG for websites?
WebP can reduce file size. Compare decoded quality, dimensions and bytes, and use JPEG when your destination requires it.
Is WebP better than PNG?
For many raster assets WebP can be smaller, including lossless and transparent files, but PNG remains a reliable lossless format. Test the actual image rather than replacing formats blindly.
Does WebP automatically improve LCP?
No. Fewer bytes can help transfer time, but LCP also depends on discovery, server/network timing and render delay. Our WebP and JPEG photo variants had nearly identical median LCP despite a clear byte difference.
Is PNG bad for website speed?
No. A specific PNG may be large or small depending on the content. PNG is often a good fit for sharp UI, diagrams and transparency; it is usually inefficient for complex photographs compared with lossy photo formats.
Does srcset matter if I already use WebP?
Yes. WebP does not stop a browser from downloading too many pixels. Responsive width candidates can avoid sending a desktop-sized source to a small mobile slot.
Should I use WebP or AVIF?
Both are modern options. AVIF can compress very efficiently, while WebP has broad modern support and mature tooling. Encode your representative images and compare quality, bytes and workflow cost.
Editorial transparency: This guide was drafted with AI assistance. The included 900 × 600 JPEG and WebP outputs support a file-byte comparison for one illustration. They do not establish an LCP or ranking improvement; those require testing the actual page, network, and device.
The practical rule
Optimize the whole delivery path, not just the extension. Pick a format that suits the asset, export the right pixel dimensions, use responsive candidates, keep the likely LCP image discoverable and eager, lazy-load below-fold media, reserve layout space, and measure the page you actually ship.