DEV Community

zjch022
zjch022

Posted on

JPG vs WebP: When to Convert Your Photos for the Web

Everyone knows JPG. WebP has been around since 2010, yet most sites still serve JPGs everywhere. Here's the honest breakdown of when converting to WebP is worth it — and the one case where it isn't.

The short version

WebP lossy compression beats JPG at the same visual quality by roughly 25–35%. A 2MB JPG photo typically becomes a 1.3–1.5MB WebP with no visible difference. On image-heavy pages, that's the single biggest performance win available — bigger than lazy loading, bigger than a CDN.

When to convert: photos on the web

Blog headers, product photos, article illustrations, hero images — if a human views it in a browser, WebP wins. Browser support is effectively universal now (Chrome, Edge, Firefox, Safari 14+, all mobile browsers), covering over 95% of real traffic.

When not to bother: archival and print

Keep your originals as JPG (or RAW). WebP is a delivery format, not an archive format — editing software support is spottier, and re-encoding a WebP again later compounds quality loss. The rule: archive in JPG, serve in WebP.

The conversion workflow

You don't need new software. You can convert photos to WebP for the web directly in your browser — everything runs locally on your device, files are never uploaded, no account needed. Drop in a batch of JPGs or PNGs, download the WebP versions, and swap them into your site.

Quality: the only setting to think about

WebP quality 85–90 is the sweet spot for photos: indistinguishable from the JPG source at normal viewing distances. Only drop below 80 if you're optimizing thumbnails where nobody will look closely. And always check one converted image at 100% zoom before batching — 30 seconds of verification beats re-doing a whole folder.

The one-line migration

For most small sites the migration is: convert the /images folder once, update the img tags, done. No build pipeline changes, no new dependencies. The page just gets faster.

Disclosure: I'm the developer of FileOnTap. The "archive JPG, serve WebP" rule is the useful takeaway whichever converter you use.

Top comments (0)