Best image format for the web
For photos, use WebP, with JPG as the fallback for anything that cannot read it. For logos, icons and diagrams, use SVG when you have a vector original. For screenshots and graphics without a vector original, use PNG or WebP. GIF is only worth keeping for small, simple animations.
That covers almost every image on a typical site. The sections below explain each choice and show what it does to file size.
Which format for which image
| Image | First choice | Fallback |
|---|---|---|
| Photo, product shot, hero image | WebP (or AVIF), lossy | JPG |
| Logo, icon, chart, diagram | SVG | PNG or WebP if you only have pixels |
| Screenshot, image with text | WebP or PNG, lossless | PNG |
| Anything that needs a transparent background | WebP or PNG | PNG (never JPG) |
| Short animation | Animated WebP, AVIF or APNG | GIF |
The table follows MDN’s image format guide, which says “for raster images, prefer WebP or AVIF, which generally provide better compression than PNG, JPEG, and GIF”, and that for screenshots, diagrams, logos and line art you should “prefer lossless encoding, as blurring and colored fringes around text and sharp edges are very visible”.
Photos: WebP, with JPG behind it
Photos can lose a little fine detail without anyone noticing, so a lossy format is the right tool. JPG has done this job for decades. WebP does the same job in fewer bytes: MDN puts lossy WebP at “on average 25–35% smaller than JPEG images of visually similar compression levels”.
Here the WebP came out well under half the size of the JPG, a bigger gap than MDN’s average, which shows how much the result depends on the picture. The PNG shows why lossless formats are the wrong pick for photos: same pixels on screen, many times the download.
You can turn an existing photo into WebP with the JPG to WebP converter, or pick WebP, JPG or PNG in the main image converter.
Browser support today
Support figures below are from caniuse.com, checked in December 2026.
- WebP: “Global usage 97.24% + 0.08% = 97.32%” (the second number is partial support). caniuse shows full support from Chrome 32, Firefox 65, Edge 18 and Safari 16.0.
- AVIF: “Global usage 96.69% + 0.02% = 96.71%”, with full support from Chrome 85, Firefox 93, Edge 121 and Safari 16.4 (partial from 16.1).
- JPEG XL: “Global usage 53.99% + 15.26% = 69.25%”. MDN suggests considering it for large, high-resolution images, but current Edge does not support it, so it still needs a fallback.
WebP is safe for most sites on its own. If you want the last few percent of visitors covered, MDN’s advice is to “use the <picture> element to provide a PNG or JPEG fallback”, which lets each browser pick the first format it can read. Upload forms and desktop apps may accept fewer formats than browsers do; if one rejects WebP, send JPG or PNG instead.
Logos, icons and diagrams: SVG if you have it
An SVG stores shapes rather than pixels. The W3C specification describes SVG content as “scalable to different display resolutions”, so one file is sharp on a phone and on a 4K monitor. MDN’s guidance is blunt: most icons have vector versions, and “you should prioritize the SVG version whenever possible.”
So use the vector file your logo was designed in. Tracing a PNG into SVG is useful when you need shapes for editing, cutting or scaling up, but do not expect it to make a web image smaller. If the only copy of a graphic is a PNG, keep it as PNG or convert it to WebP with the PNG to WebP converter, which keeps the transparent areas.
Screenshots and graphics with text
Text, thin lines and flat colour show lossy damage first: soft edges and coloured fringes around letters. MDN describes PNG as “better for screenshots, diagrams, and line art” and calls it “the fallback for any image needing transparency, as JPEG has no alpha channel.” Lossless WebP does the same job; MDN puts it at “typically 26% smaller than the same images in PNG format”.
If you need a smaller PNG, cutting it to 256 colours usually does far more than switching format. Our converter offers that as the “256 colours” option for PNG.
Animations: move on from GIF where you can
GIF is the old default for moving pictures, but every frame is limited to a palette: MDN notes that “each palette has 2, 4, 8, 16, 32, 64, or 256 entries”, so photo-like animation turns grainy. Its summary for GIF says to “consider WebP, AVIF or APNG for animation sequences”, and Google’s WebP documentation says animated WebP “can provide reduced sizes compared to GIF and APNG”.
The GIF resizer and GIF compressor keep the animation and the GIF format. This site does not make animated WebP.
Size the image before you choose the format
Format is the second decision. The first is pixel size: a photo shown 800 px wide does not need 4000 px. In the photo example above, resizing to 1600 × 1200 and saving as JPG at 80% took the file from 3,761,521 bytes to 142,405 bytes before WebP saved anything more. Theguide to compressing images for a website walks through sizing and compression in order, and WebP vs JPG andPNG vs JPG compare those formats head to head.
Questions
Should I switch every image on my site to AVIF?
Only if your build or hosting can produce it and you keep a fallback. MDN advises a WebP, JPEG or PNG fallback for AVIF. This site’s converter makes JPG, PNG and WebP, not AVIF.
Is PNG a bad choice for the web?
Not for graphics. PNG is lossless and keeps transparency, which suits screenshots and logos. It is a poor choice for photos: our 1600 × 1200 test photo was 2,576,588 bytes as PNG against 54,328 bytes as WebP.