WebP vs JPEG is the wrong question on its own. Here is which format wins for photographs, screenshots, logos and social uploads, and why.
For your own website, use WebP for almost everything and AVIF where you can afford the extra encode time. For uploading to a social platform, use JPEG for photographs and PNG for anything with text or flat colour — the platform is going to convert it anyway, and those two are what every uploader accepts without surprises.
JPEG is a photographic format from an era of much smaller images. It compresses smooth gradients and texture beautifully and mangles hard edges — the fringing you see around text in a JPEG screenshot is intrinsic to how it works, not a quality-setting problem. It cannot store transparency.
WebP does both jobs. It has a lossy mode that beats JPEG at the same visual quality — typically producing meaningfully smaller files — and a lossless mode that beats PNG. It supports transparency and animation. Browser support is now universal enough that the old objection has expired.
So on your own site the comparison is straightforward: WebP is smaller than JPEG at the same quality and does more. The reason JPEG survives is that everything on earth accepts it, which is exactly what matters when you are handing a file to somebody else's uploader.
Where PNG still wins
PNG is lossless, which is the whole point. For screenshots, diagrams, charts, UI mock-ups and anything with type, PNG preserves the pixels exactly — and those are the images where JPEG's artefacts are most visible and most annoying.
PNG's weakness is photographs, where lossless encoding produces files several times larger than a JPEG nobody could tell apart from the original.
The practical rule: if the image has sharp edges between flat areas of colour, PNG or WebP-lossless. If it has texture and gradients, JPEG or WebP-lossy.
AVIF, and when it is worth the trouble
AVIF compresses better than WebP — often substantially, particularly on photographs at low bitrates. Two costs: encoding is slow, and support, while broad, is not quite as universal as WebP.
For a content site where images are encoded once and served many times, that trade is obviously worth taking. Serve AVIF with a WebP fallback and you have the smallest files available today.
One caveat worth knowing on this platform: our own image tools run on GD, which handles JPEG, PNG, WebP and GIF but not AVIF. If you need AVIF, encode it in your build pipeline rather than expecting a browser tool to do it.
The formats you can ignore
GIF for anything other than a genuine animated meme. It is limited to 256 colours, produces enormous files, and a short video or an animated WebP is smaller and looks better in every case.
BMP and TIFF anywhere near the web. They are archival and editing formats.
HEIC, the format an iPhone shoots by default, when handing files to other people or other tools. Support outside Apple's ecosystem is patchy enough to be a nuisance; convert to JPEG or WebP before you send it anywhere.
SVG is the exception that belongs in the opposite direction: for logos, icons and diagrams it is the best format available, because it is resolution-independent and usually tiny. It is simply not applicable to photographs.
What the platforms do to your file anyway
Uploading a carefully chosen format does not mean it survives. Pinterest converts everything to 8-bit RGB JPEG (Pinterest specs). Instagram and Facebook re-encode aggressively. X and LinkedIn are gentler with PNG.
So the format decision for uploads is really "which format gives their encoder the best input", and the answer is the same as always: photographs as JPEG at high quality, everything with edges as PNG.
For your own website, yes - smaller files at equal quality, plus transparency and lossless mode. For uploading to social platforms, JPEG is the safer input because every uploader accepts it and re-encodes anyway.
Should I use PNG or JPEG for screenshots?
PNG. JPEG produces visible fringing around text and UI edges at any quality setting you would actually use.
Is AVIF worth using?
On a site where images are encoded once and served often, yes. Encoding is slow, so it belongs in a build step rather than an interactive tool.
Do social platforms accept WebP?
Support varies and several convert it anyway. Uploading JPEG or PNG avoids surprises without costing you anything.
Every platform publishes a larger copy of a post's picture than the one the feed renders. Here is where each one keeps it, and where the trail goes cold.
Pinterest serves every Pin at four fixed widths and keeps the original under a path the interface never links to. Here is how to get the file as uploaded.