Image Tools • 5 min read

The Modern Web Image Optimization Guide: WebP, AVIF, PNG & JPG

When to use WebP, AVIF, PNG, JPG and SVG on a website, and a simple resize, convert and compress workflow that cuts image weight without visible loss.

Published: 2026-10-18 • Last Updated: 2026-11-11 • By Mohammed Zawwar Hussain

Interactive Online Tools Referenced in this Guide

Why Image Optimization is Critical for Core Web Vitals

On most websites images are the heaviest thing a visitor downloads. A large, unoptimised hero image is a common cause of a slow Largest Contentful Paint (LCP), and images without width and height set cause layout shifts (CLS). Both are part of Google's Core Web Vitals. Serving images at the size they are displayed, in a modern format such as WebP, usually cuts their weight substantially with no visible difference.

Format Showdown: Choosing the Right Format for Every Asset

Format Best Use Case Compression Efficiency Alpha Transparency
WebP Universal web photos & graphics 30% smaller than JPEG Full 8-bit Alpha
AVIF Next-gen photography & banners 50% smaller than JPEG Full Alpha & HDR
PNG Pixel-art, logos, screenshots Lossless (larger files) Full 8-bit Alpha
SVG Vector icons & geometric logos Infinite resolution, tiny size Native Vector

Recommended Image Optimization Workflow

Follow this 3-step pipeline to achieve optimal speed on any website:
  1. Crop & Resize First: Never serve a 4000px camera photo inside a 600px card. Use the Image Resizer to set max display dimensions.
  2. Convert to WebP: Convert PNG and JPEG files with the Image Format Converter. Keep PNG for logos and screenshots that need sharp edges.
  3. Compress with Perceptual Tuning: Use the Image Compressor at 80% quality to shed unnecessary bytes without visual artifacts.

What each format is good at

FormatCompressionTransparencyUse it for
JPGLossyNoPhotos, when every app and portal must accept the file
PNGLosslessYesLogos, screenshots, diagrams and anything with sharp edges or text
WebPLossy or losslessYesWebsite images: usually 25–35% smaller than JPG at similar quality
AVIFLossy or losslessYesWebsites that want the smallest files; slower to encode and not accepted everywhere yet
BMPNoneNoOnly old software that asks for it; files are very large
Image Converter saves WebP, JPG, PNG or BMP. For AVIF you currently need a dedicated encoder; WebP gets most of the benefit with far wider support.

Resize first, then compress

The biggest savings come from pixel dimensions, not from quality settings. A 4000 × 3000 phone photo has 12 million pixels; resized to 1600 × 1200 it has under 2 million, about one sixth. So:
  1. Use Image Resizer to bring the image down to the largest size it will actually be displayed at.
  2. Then use Image Compressor and lower the quality until you just start to see a difference, then step back up a little.
  3. Convert to WebP for websites, or keep JPG where compatibility matters more than bytes.
For common target sizes (social posts, banners, passport-photo uploads), see the image sizes guide.

Pitfalls that cost quality

  • Re-saving JPGs repeatedly. Each lossy save throws away a little more detail. Keep an original and always export from it.
  • Saving screenshots as JPG. Text and flat colours get fuzzy halos. PNG or lossless WebP stays crisp and is often smaller.
  • Converting transparent PNG to JPG. JPG has no transparency, so the see-through areas are filled with a solid background colour.
  • Upscaling. Making a small image bigger cannot add detail; it only makes the file larger and softer.

Product photos with a clean background

Marketplaces often ask for a plain white or transparent background. Background Remover cuts out the subject and exports a transparent PNG. Keep that PNG as your master copy, then place it on white and save a JPG or WebP for listings that do not accept transparency.

Hidden data inside photos

Photos from phones carry EXIF metadata: the camera model, the date and time and, very often, the exact GPS location where the picture was taken. That is harmless for your own albums but risky when you post a photo of your home or send it to a stranger.
  • Check what a photo contains with EXIF Metadata Viewer, which can also strip it.
  • Re-encoding with Image Compressor drops most metadata as a side effect, but do not rely on that for sensitive photos; strip it deliberately.
The guide to removing location data from photos walks through it step by step.

Check the result before you publish

Open the optimised image at 100% zoom next to the original. Look at faces, fine text and smooth skies, which show compression problems first. Then check the numbers: the new file size, the pixel dimensions and, for websites, the page's loading speed in your browser's developer tools. If a page still feels slow, the cause is usually too many images or images far larger than their display size, not the format.

Frequently Asked Questions

Will WebP images display on all web browsers and devices? ↓
All current versions of Chrome, Edge, Firefox and Safari (macOS and iOS) display WebP. Only very old browsers and some older desktop programs do not.
How do I remove backgrounds for ecommerce product photos? ↓
You can use the AI-powered Background Remover to automatically detect product edges, eliminate backgrounds, and export clean transparent PNGs.
What quality setting should I use for JPG or WebP? ↓
Around 75–85 is a good default for photos. Go lower only after checking the image at full size.
Can I convert HEIC photos from an iPhone? ↓
Yes, with the HEIC converter. The guide on HEIC vs JPG explains when to convert and when to change the iPhone setting instead.
Are my images uploaded? ↓
Image Compressor and Image Resizer run in your browser. Tools that process on our server say so on the page and delete uploads after processing.
Does compressing remove the GPS location from a photo? ↓
Re-encoding usually drops it, but not every tool does. Use the EXIF viewer to confirm, or strip the metadata explicitly.