· 6 min read
JPG, PNG, WebP or AVIF: the best image format for your website
Images are usually the heaviest part of a web page, and the largest image is often what Google measures as your Largest Contentful Paint. Choosing the right format is one of the quickest ways to make a site faster. Here’s how the main formats compare and which to pick.
The short answer
- Photos: AVIF for the smallest files, WebP as a fast, near-universal choice, JPG as the fallback.
- Logos, icons and simple illustrations: SVG.
- Screenshots and graphics with sharp edges or text: WebP (lossless) or PNG.
- Short animations: WebP or AVIF instead of GIF, or a muted MP4 video.
JPG: universal, but dated
JPG (JPEG) has worked everywhere since the 1990s and is still a safe default for photos. It has no transparency, and its 8×8 block compression shows as blocky artefacts at low quality. Use a quality around 75–85 for the web; going higher rarely improves what visitors see but adds a lot of weight.
PNG: lossless, great for graphics, heavy for photos
PNG never loses detail and supports full transparency, which makes it ideal for screenshots, UI and anything with text. For photographs it is the wrong choice: a PNG photo is often 5–10 times larger than the same photo as JPG. If you have PNG photos on your site, convert PNG to WebP or PNG to JPG.
WebP: the practical default
WebP, released by Google in 2010, supports lossy and lossless compression, transparency and animation. Lossy WebP files are typically 25–35% smaller than JPG at similar quality, and every modern browser supports it, including Safari since version 14. For most sites, serving WebP is the easiest win.
AVIF: the smallest files
AVIF is based on the AV1 video codec and is usually around 50% smaller than JPG and noticeably smaller than WebP, with excellent detail in gradients and support for HDR and wide colour. All major browsers support it (Safari since 16). The trade-offs: encoding is slower, and some editors, CMSs and social networks still don’t accept AVIF uploads. Use it for large hero images and photo-heavy pages, with JPG or WebP as a fallback.
SVG: for logos and icons
SVG is a vector format, so it stays perfectly sharp at any size and is often just a few kilobytes. Use it for logos, icons and flat illustrations. If you only have a PNG or JPG logo, Reimply can trace PNG to SVG, which works best on simple artwork with a few colours.
Format is only half of it: size matters too
Don’t serve a 4000-pixel photo in an 800-pixel slot. Resize to roughly twice the displayed width for sharp screens, then compress. Always set width and height on images so the layout doesn’t jump while they load, and lazy-load images below the fold. You can compress images to a quality or an exact target size.
Frequently asked questions
Is WebP better than PNG?
For photos, yes, by a wide margin. For graphics, lossless WebP is usually 20–30% smaller than PNG with identical pixels.
Do all browsers support AVIF?
Current versions of Chrome, Edge, Firefox and Safari (16+) do. Keep a JPG or WebP fallback for older devices.
Does image format affect SEO?
Indirectly. Smaller images load faster, which improves Core Web Vitals such as Largest Contentful Paint, a signal Google uses in ranking.