← Back to TechDriven Tools Hire developers →

Published · Updated · 5 min read · By TechDriven Tools editorial team · Image Tools

WebP, AVIF, and JPG — which file to put on a website

A practical comparison of JPG, WebP, and AVIF for ordinary sites, without invented benchmarks.

WebP, AVIF, and JPG — which file to put on a website

The decision is the visitor’s browser, not the codec brochure

JPG is the file every current browser can show. WebP is the file current Chrome, Edge, Firefox, and Safari can show, and it is often smaller than JPG for the same photo. AVIF can be smaller still, and support is good in modern browsers, but it is the one most likely to surprise you on an old embedded webview or a tool that only accepts JPG. This site’s image tools export JPG, PNG, and WebP. They do not export AVIF. That is a limit, not a ranking of the format.

If you are choosing a format for a marketing page in 2026, WebP is the default I would ship for photographs, with JPG as the file you still accept from a camera. AVIF is worth adding when you control the HTML and you can provide a fallback. A single <img> pointing only at AVIF is how a photo disappears for someone you did not test.

What actually changes the file size

Format is one lever. Pixel dimensions are a bigger one. A 4000-pixel-wide photo of a shoe, displayed at 400 pixels, wastes bytes no matter the codec. Resize Image on this site sets width and height in pixels. Do that before you argue about WebP quality sliders. Then compress.

JPEG quality around 0.7 to 0.8 is where many product photos still look fine and the file drops hard. Below that, edges around text in the photo start to ring. PNG is the wrong default for a photograph. It is the right default for a logo, a screenshot of UI, or anything with a hard edge and few colors. WebP can carry transparency. JPEG cannot. If you convert a transparent PNG to JPG in the converter, the transparent pixels become flat. The tool page says that. Check the result on a non-white background if the logo had a cutout.

A worked path for a homepage hero

  1. Export the photo from the camera as JPG. Do not start from a screenshot of the photo.
  2. Resize to the largest width you actually display. If the layout is 1200 pixels wide, 1600 pixels is plenty for a sharp screen. 6000 is not.
  3. Convert to WebP at a quality you can look at, not a quality you guessed from a blog table. Use Convert to WebP and open the download next to the original.
  4. Keep the JPG if a partner’s CMS rejects WebP. Convert to JPG or PNG exists for that, one file at a time, so you notice the result.
  5. Strip metadata if the photo was taken at a client’s office and the EXIF still has GPS. Remove Image Metadata re-encodes the pixels and drops the tag block. Delete the original if the location must not remain on your disk either. The new file does not edit the old one.

None of those steps upload the photo to TechDriven. They use the canvas in the tab. A 20 megapixel image can make a phone tab slow. The UI yields, but the bitmap still needs memory. Desktop browsers are the right place for a batch of large photos. Compress Image can zip several results. That zip is built locally.

AVIF, without a fake bake-off

I am not going to invent a “AVIF is 50% smaller” number. The gap depends on the image. A flat illustration and a noisy night photo do not behave the same. What you can rely on is the shape of the tradeoff: AVIF encode is slower, decode support is newer, and the savings show up when you are already resizing and already willing to use a modern format. If your host or email form only allows JPG, AVIF is irrelevant. Use Compress to KB, which targets a JPEG size, and read the size it actually produced. A target under 10 KB is refused because the result stops being a face.

HTML that does not break

If you do serve more than one format, the picture element is the boring correct tool:

<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Workshop table with a laptop and a notebook" width="1200" height="800">
</picture>

The img is not optional. It is the fallback and the place the alt text lives. Width and height on the img are how you avoid a layout jump. This article is not a converter for AVIF. If you need AVIF, use a build step you can re-run, not a one-off website that takes the master file.

Favicons are a different problem

A hero image and a favicon should not share a workflow. Favicon Generator center-crops to a square and exports 16, 32, 48, and 180 pixel PNGs plus an ICO that embeds PNG data. A wide wordmark will be cut. Start from a square mark. Do not put a photograph in a 16-pixel icon and expect it to read.

What to ignore

Ignore articles that rank formats with a single stock photo and a trophy. Ignore tools that add a watermark to the download. Ignore any converter that cannot tell you the file stayed on the device if that is the reason you avoided an upload site. And ignore the urge to convert a vector logo to JPEG “for speed.” Draw it as SVG, or as PNG if the environment cannot take SVG. When you are unsure, ship the JPG you already checked, then add WebP beside it. A missing picture is worse than an extra 40 kilobytes.

Try the related tools

Ready to try it? Use WebP Converter free, right in your browser — no upload, no account.

Available tools in this category: Image Compressor · Image to Text (OCR) · Image Resizer · Image Cropper · Image Rotator

← More guides · All tools