Image guide

WebP vs AVIF vs JPG vs PNG: Which Image Format Should You Use?

WebP, AVIF, JPG and PNG compared: file size, quality, transparency and browser support — and which format to use for photos, logos and Shopify stores.

Images are usually the heaviest part of a web page, so the format you choose has a direct effect on load time, Core Web Vitals and conversions. Here’s a practical comparison of the four formats you’ll actually use.

Quick comparison

FormatBest forTransparencyTypical size*
JPGPhotos, maximum compatibilityNo100%
PNGLogos, screenshots, graphics with textYes200–500% for photos
WebPPhotos and graphics on websitesYes~65–75%
AVIFPhotos where every KB countsYes~50%

*Rough file size of the same photo at similar visual quality, relative to JPG. Results vary by image.

JPG: the universal photo format

JPG works everywhere — every browser, app, printer and upload form. It compresses photos well but doesn’t support transparency, and repeated saving degrades quality. Use it when you send photos to other people or systems, and as a fallback.

PNG: lossless, for graphics

PNG keeps every pixel exactly, supports transparency and is perfect for logos, icons, UI screenshots and anything with sharp edges or text. For photos it’s simply too big. If you have a logo, consider SVG — and convert it to PNG only where SVG isn’t accepted, using SVG to PNG.

WebP: the best default for websites

WebP supports both lossy and lossless compression and transparency, and every current browser supports it. For most sites it’s the best balance of size, quality and encoding speed. Convert existing JPGs and PNGs in bulk with the WebP Converter.

AVIF: smallest, but slower to create

AVIF typically beats WebP by another 20% or so, especially on photos with smooth gradients. All current versions of Chrome, Edge, Firefox and Safari display it. The trade-offs: encoding is slower, and some editing tools and upload forms don’t accept it yet. Create AVIF files with the Format Converter (your browser needs AVIF encoding support).

What to use where

  • Shopify: upload high-quality JPG or PNG. Shopify’s CDN automatically serves WebP or AVIF to supported browsers, so converting first gains little. See the Shopify image size guide.
  • WordPress and custom sites: serve WebP (or AVIF with a WebP/JPG fallback) using the <picture> element or an image-optimisation plugin.
  • Email newsletters: JPG and PNG — WebP support in email clients is still inconsistent.
  • Forms and documents: JPG, compressed to the required size with the Image Compressor.

Serving modern formats with a fallback

<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Summer collection" width="1600" height="900" loading="lazy">
</picture>

The browser picks the first format it supports. Always set width and height so the page doesn’t jump while images load.

Frequently asked questions

Is WebP better than JPG?

For websites, usually yes: WebP is typically 25–35% smaller than JPG at the same visual quality and also supports transparency.

Is AVIF supported by all browsers?

All current versions of Chrome, Edge, Firefox and Safari support AVIF. Very old browsers do not, so serve a fallback with the <picture> element if you need to support them.

When should I still use PNG?

For logos, icons, screenshots and graphics with sharp edges or text — or use SVG for logos where possible.