Paj Digital Labs
All articles
Web Design & Engineering

Image Performance in 2026: Formats, Responsive Sizes and the LCP Image

Images are still the heaviest thing on most pages. Picking modern formats, serving the right size to every screen, and treating the largest contentful image as a special case that deserves priority.

Paj Digital Labs 2 min read
Web design workspace with desktop and laptop displays
Editorial illustration · Web Design & Engineering

On most content sites I audit, images are more than half of the page weight, and the slowest metric — Largest Contentful Paint — is an image. Get images right and you fix most of the performance problem without touching JavaScript.

Use modern formats

AVIF and WebP are supported by every current major browser. Both are significantly smaller than JPEG at similar visual quality — AVIF typically more so, at the cost of slower encoding.

html
<picture>
  <source srcset=class="text-code-string">"/img/hero.avif" type=class="text-code-string">"image/avif" />
  <source srcset=class="text-code-string">"/img/hero.webp" type=class="text-code-string">"image/webp" />
  <img src=class="text-code-string">"/img/hero.jpg" alt=class="text-code-string">"Server rack with cabling" width=class="text-code-string">"1600" height=class="text-code-string">"900" />
</picture>

If you use an image CDN, it can negotiate the format automatically from the browser's request headers, which keeps your markup simple.

Serve the right size

A 2400-pixel-wide image displayed in a 600-pixel column on a phone wastes most of its bytes. srcset and sizes let the browser choose.

html
<img
  src=class="text-code-string">"/img/cover-800.webp"
  srcset=class="text-code-string">"/img/cover-400.webp 400w, /img/cover-800.webp 800w, /img/cover-1600.webp 1600w"
  sizes=class="text-code-string">"(min-width: 1024px) 720px, 100vw"
  alt=class="text-code-string">"..." width=class="text-code-string">"1600" height=class="text-code-string">"900" />

The sizes attribute is where people go wrong. It must describe how wide the image will be displayed in your layout, not the image's natural size. If it says 100vw but the image is in a narrow column, the browser downloads a much larger file than needed.

Always set dimensions

width and height attributes let the browser reserve space before the image loads, preventing layout shift. With CSS max-width: 100%; height: auto; the image still scales responsively. This single habit eliminates a large share of Cumulative Layout Shift problems.

The LCP image is special

The largest image above the fold usually determines LCP. Treat it differently from every other image:

  • Do not lazy-load it. Lazy-loading the hero is one of the most common performance regressions I see.
  • Give it high priority with fetchpriority="high".
  • Make it discoverable in the HTML, not injected by JavaScript or set as a CSS background.
  • Preload it if it is referenced late, such as from CSS.
html
<img src=class="text-code-string">"/img/hero.avif" fetchpriority=class="text-code-string">"high" alt=class="text-code-string">"..." width=class="text-code-string">"1600" height=class="text-code-string">"900" />

Lazy-load everything else

Below-the-fold images should use loading="lazy". It is native, reliable and costs nothing. Combine it with decoding="async" for images that are not critical.

Compression settings

| Format | Starting quality | Notes | |---|---|---| | AVIF | 50–60 | Check fine text and gradients | | WebP | 75–80 | Good all-round default | | JPEG | 75–82 | Use progressive encoding | | PNG | Lossless | Only for sharp graphics needing transparency |

Look at results at real display size, not zoomed in. Most images survive more compression than designers expect.

SVG for icons and diagrams

Logos, icons and simple diagrams should be SVG: tiny, sharp at any size, and styleable. Run them through an optimiser to strip editor metadata, which often makes up most of the file.

Measure on real devices

Lab tools are useful, but check field data for your actual visitors. A page that loads fast on office fibre can still miss LCP targets on mid-range phones on mobile networks — which is where most readers are.

Images are the easiest big performance win on the web. Modern formats, correct sizes, explicit dimensions, and special treatment for the one image that matters most.

Paj Digital Labs

The engineering journal of Paj Digital Solutions — hosting, server infrastructure and web engineering, written by the people who run the servers.

Related reading