Guide

How to optimize images for the web (2026 guide)

By the Lumiveil team ยท Updated 6 August 2026 ยท 6 min read

On most websites, images account for more than half of the total page weight. They're the single biggest reason pages load slowly โ€” and slow pages lose visitors, rank worse on Google, and convert less. The good news: a few consistent habits make your images dramatically smaller with no visible quality loss. Here's the 2026 playbook.

1. Start with the right format

Format choice sets the floor for file size. Photographs belong in JPEG or WebP; graphics with sharp edges, text, or transparency belong in PNG or WebP. WebP usually beats both. (See our full breakdown: PNG vs WebP vs JPEG.)

๐Ÿ’ก Rule of thumb: photos โ†’ WebP/JPEG. Logos, screenshots, graphics with text or transparency โ†’ WebP/PNG.

2. Compress โ€” but smartly

Compression is where the biggest wins are. A photo straight off a phone can be 4โ€“6 MB; the same image at web quality is often 150โ€“300 KB โ€” a 95% reduction that looks identical on screen.

You can do this privately and free in your browser with the Lumiveil compressor โ€” no uploads, no limits.

3. Resize to the size you actually display

A common mistake: uploading a 4000-pixel-wide photo into a 600-pixel-wide column. The browser downloads the full file and shrinks it โ€” pure waste. Resize images to roughly 1.5โ€“2ร— the display width (for retina screens) before uploading. Try the Lumiveil resizer.

4. Serve modern formats (WebP)

WebP produces files 25โ€“35% smaller than JPEG at the same visual quality, with transparency and animation support. Every major browser supports it in 2026, so there's almost no reason not to use it. Convert your existing JPEGs and PNGs with the Lumiveil converter.

5. Lazy-load and use width/height attributes

Add loading="lazy" to below-the-fold images so the browser only fetches them when needed, and always include width/height attributes to prevent layout shift (a Core Web Vitals ranking factor).

6. Do it privately

Most online optimizers upload your images to their servers. If you're working with client material, screenshots of sensitive dashboards, or anything you'd rather not hand to a third party, use a browser-based tool like Lumiveil that processes locally โ€” your files never leave your device.

Quick checklist

  1. Pick the right format (WebP by default).
  2. Resize to ~2ร— display width.
  3. Compress to 60โ€“80% quality.
  4. Lazy-load and set dimensions.
  5. Audit regularly โ€” images creep back up over time.

Optimize your images now

Compress, resize and convert โ€” privately, in your browser.

Open the compressor โ†’

Read next: PNG vs WebP vs JPEG ยท All articles