Tutorial6 min read·Updated

How to Serve WebP with the HTML picture Element

97%+ of browsers display WebP. The `<picture>` element is for the remainder and for email-adjacent pages that still prefer JPEG. Generate WebP as the primary file; keep a JPEG fallback only where analytics show you need it.

The markup

Put a source type="image/webp" first, then an img JPEG/PNG fallback. Browsers pick the first supported source. This is still the correct progressive-enhancement pattern for conservative enterprises.

Why it matters

  • Some intranet browsers and export-to-PDF tools are picky.
  • OG scrapers vary; many now accept WebP, some prefer JPEG/PNG.
  • You may have a legal requirement to support a specific old browser.

How to do it

  1. Convert the batch to WebP at your target width.
  2. If you need fallbacks, export a second JPEG pass at quality 75 from the same originals (or keep the original JPEG).
  3. Wrap with <picture> and set width/height on <img> to prevent CLS.

Settings that work

WebP 80%. Fallback JPEG 75%. Same max width so layout matches.

When you can skip picture

If your analytics show zero IE / old-iOS traffic, a single <img src="…webp"> is simpler and enough. Do not cargo-cult fallbacks on a 2026 consumer site.

Convert a batch in your browser. Nothing is uploaded.

Put it into practice

Convert your images to WebP right now, free and privately in your browser.

Open the converter

Frequently asked questions

Only for specific legacy clients. Most public sites can ship WebP alone.

It can hurt if you forget dimensions or preload the wrong URL. Preload the WebP the browser will actually use.

This converter outputs WebP. Keep your original JPEG as the fallback file.

Keep reading

Formats5 min read

WebP browser support

Which browsers support WebP? Complete 2026 compatibility table for Chrome, Safari, Firefox, Edge, iOS, Android, plus email clients, CMSs and how to add a fallback.

Read more
Tutorial6 min read

WebP in Next.js

next/image can serve WebP, but huge files in /public still hurt. How to pre-convert static assets and CMS images for Next.js App Router.

Read more
SEO6 min read

OG tags and WebP

Use JPEG or PNG for og:image if you need reliable unfurls. Use WebP for on-page images.

Read more