Market
Pricing
Sign inStart
Field GuideCSS and web
CSS and web

WebP vs PNG and JPG: modern formats for the web

Your website does not have to serve the same files you post to Instagram. WebP and AVIF do the same job as PNG and JPG in fewer bytes, if you set them up properly.

GradientlyVerified Gradiently account·October 1, 2026·5 min read
Cover: Wisteria Mill · GR·BCA2·94

The short version

  • WebP is an image format that can be lossy like JPG or lossless like PNG, and supports transparency and animation.
  • At similar visual quality, WebP files are usually noticeably smaller than JPG and PNG equivalents.
  • Every current version of Chrome, Safari, Firefox and Edge supports WebP, so a fallback is only needed for very old browsers.
  • AVIF compresses further than WebP and is now widely supported, but it encodes more slowly.
  • Keep PNG and JPG for uploads to social platforms and for files you send to people; use WebP or AVIF on your own website.
On this page
What WebP isWebP vs PNG for graphics and transparencyWebP vs JPG for photosAVIF vs WebPWhere PNG and JPG still winHow to convert PNG to WebP

In the WebP vs PNG and JPG question, WebP wins on your own website: it can compress like a JPG or losslessly like a PNG, supports transparency, and produces smaller files at the same visual quality. Every current browser supports it. Where PNG and JPG still win is everywhere outside your site: uploads to Instagram and LinkedIn, email attachments, files for clients and printers. So the practical rule is simple. Make and keep masters in PNG, serve WebP (or AVIF) to visitors.

What WebP is

WebP is an image format developed by Google and documented on web.dev. One format covers what used to need three: lossy photos like JPG, lossless graphics with transparency like PNG, and short animations like GIF. The saving comes from smarter compression, which predicts each block of pixels from its neighbours and stores only the difference.

LossyYes

PNG

No

WebP

Yes

AVIF

Yes
LosslessNo

PNG

Yes

WebP

Yes

AVIF

Yes
Transparency

JPG

No

PNG

Yes

WebP

Yes

AVIF

Yes
Animation

JPG

No

PNG

Limited (APNG)

WebP

Yes

AVIF

Yes
Browser support

JPG

Universal

PNG

Universal

WebP

All current browsers

AVIF

All current browsers
Accepted by social platforms

JPG

Yes

PNG

Yes

WebP

Inconsistently

AVIF

Rarely
FeatureJPGPNGWebPAVIF
LossyYesNoYesYes
LosslessNoYesYesYes
TransparencyNoYesYesYes
AnimationNoLimited (APNG)YesYes
Browser supportUniversalUniversalAll current browsersAll current browsers
Accepted by social platformsYesYesInconsistentlyRarely
Check current support on caniuse.com if your audience uses old devices.

WebP vs PNG for graphics and transparency

For logos, interface images and cutouts, lossless WebP keeps every pixel like PNG and is usually smaller. Lossy WebP with transparency is the bigger win: a product cutout that needs a soft, see through edge can be a fraction of the PNG size with no visible difference.

Gradients are the exception that needs care. A smooth dark blend can band in lossy WebP just as it does in JPG. If your hero image is mostly gradient, compare lossy at a high quality against lossless, and consider whether it should be an image at all: a CSS gradient costs no download.

Dark, subtle blends show compression first; bright, busy ones hide it. Choose WebP settings by the content, not by habit.

WebP vs JPG for photos

For photographs, lossy WebP at a quality around 75 to 80 usually matches a JPG at 85 while being smaller. The difference adds up on pages with many images: product grids, portfolios, blogs. On a single hero photo the gain is real but less dramatic, and getting the pixel dimensions right matters more than the format.

  1. 1

    Size first

    Export the photo at the largest size it actually displays. A 1920×1080 website hero never needs a 6000 pixel original.

  2. 2

    Pick a quality

    Start lossy WebP at 80. Look at skin, skies and dark corners at 100% zoom, then step down until something changes, and go back one step.

  3. 3

    Make smaller versions

    Export 640, 1280 and 1920 pixel widths so phones download the small one.

  4. 4

    Serve with srcset

    Let the browser choose the right width with srcset and sizes, as in the code below.

AVIF vs WebP

AVIF is newer and usually compresses further than WebP, especially on photographs and smooth tones. It is supported in all current major browsers. Its costs are slower encoding, which matters if you convert images on the fly, and fewer tools that open it. Many sites serve AVIF first, WebP second and JPG last, and let the browser take the first it understands.

html
<picture>
  <source type="image/avif" srcset="hero-1280.avif 1280w, hero-1920.avif 1920w" sizes="100vw">
  <source type="image/webp" srcset="hero-1280.webp 1280w, hero-1920.webp 1920w" sizes="100vw">
  <img src="hero-1920.jpg" alt="Evening light over the harbour" width="1920" height="1080" fetchpriority="high">
</picture>
The browser uses the first source it supports and falls back to the img. The width and height stop the layout jumping as it loads.

If you use a framework or an image CDN, it may do all of this automatically from one uploaded original. Check what it outputs before you hand convert anything.

Animated WebP and GIF

Animated WebP is far lighter than GIF and keeps full colour, so it suits small looping graphics on a page. For anything longer than a few seconds, a muted MP4 or WebM video is lighter still. GIF vs MP4 compares them in detail.

Where PNG and JPG still win

Use WebP or AVIF

  • Images on your own website
  • Product grids and galleries
  • Blog and article images
  • Transparent cutouts on the web

Use PNG or JPG

  • Uploads to Instagram, LinkedIn, X and Facebook
  • Open Graph link preview images
  • Files you email or send to clients
  • Masters you will edit again

Social platforms convert uploads themselves, and some reject or mishandle WebP. Link preview crawlers vary too, so keep your Open Graph image as a 1200×630 PNG or JPG. And a WebP sent to a client often opens in the wrong app or not at all.

New in
The spring collection is live.
Shop now at the link
Gradiently · @gradiently

A link preview at 1200×630. Keep this one as PNG so every platform's crawler can read it.

How to convert PNG to WebP

Google's free cwebp command line tool converts one file or a whole folder, and most image editors and design tools now export WebP directly.

bash
# lossy, good for photos
cwebp -q 80 photo.png -o photo.webp

# lossless, good for logos and interface graphics
cwebp -lossless logo.png -o logo.webp

# a whole folder
for f in *.png; do cwebp -q 80 "$f" -o "${f%.png}.webp"; done
Keep the PNG originals. Converting WebP back to PNG does not restore detail lost to lossy compression.

Your master design files can stay in PNG: Gradiently exports designs as PNG and JPG, which are the right inputs for this step and the right files for every social upload. For the reasoning behind quality settings, read image compression without ruining gradients; for the older pair, PNG vs JPG; and for the full speed checklist, optimising images for the web.

Design with a living gradient

Posts, stories, slides and banners in every size, with text that always reads.

Start designing, free

Questions people ask

Is WebP better than PNG?

On a website, usually yes: lossless WebP keeps the same pixels in a smaller file and supports transparency. For social uploads and files you send to people, PNG is safer because it opens everywhere.

Do all browsers support WebP?

All current versions of Chrome, Safari, Firefox and Edge support WebP. Use a picture element with a JPG or PNG fallback if you need to reach very old browsers.

Should I use AVIF or WebP?

AVIF is usually smaller, WebP encodes faster and is supported by more tools. Serving AVIF first with a WebP fallback gives most visitors the smallest file.

Can I upload WebP to Instagram?

Support is inconsistent, so upload PNG or JPG at the exact size instead, such as 1080×1350 for a portrait post.

Does WebP support transparency?

Yes, in both lossy and lossless modes, which makes it a good replacement for transparent PNGs on the web.

Share this guide

Written by GradientlyVerified Gradiently account

The team behind Gradiently, a design tool built around Marks: living gradients that make everything you design look like yours.

See our profile

On this page

What WebP isWebP vs PNG for graphics and transparencyWebP vs JPG for photosAVIF vs WebPWhere PNG and JPG still winHow to convert PNG to WebP

Share this guide

Next in CSS and web

Print ready PDF: how to export files a printer accepts

Keep reading

All CSS and web guides
CSS and web

PNG vs JPG: which image format to use and when

6 min read

One format keeps every pixel, the other throws detail away to stay small. Knowing which detail gets thrown away tells you which to pick, every time.

CSS and web

Image compression without ruining gradients

5 min read

Photos survive heavy compression. Gradients do not. Here is why a smooth blend turns into stripes, and the exact settings that keep it smooth while the file stays small.

CSS and web

Optimise images for the web without losing quality

6 min read

Images are usually the heaviest part of a page and the reason Lighthouse complains. Here is a working method: the right pixel sizes, the right format, responsive markup and loading hints, without visible loss.

Find the look that’s only yours.

Every Mark is a living background with one owner. Try an unclaimed Mark, and claim yours when it feels right.

Start designing

Check a certificate

Type a certificate number or a Mark’s code to see who owns it.

Works with ChatGPT and Claude

Ask your AI for a design. It makes it in your Mark, ready to edit.

ChatGPTClaude
How to connect

Product

  • Market
  • Explore
  • Pricing
  • Certificates

Learn

  • Field Guide
  • Help centre
  • What’s new

Developers

  • Overview
  • ChatGPT and Claude
  • API reference
  • API keys

Company

  • About
  • Contact us
  • Sign in

Legal

  • Terms
  • Privacy
  • Refunds
  • Mark protection
  • Cookies
  • All policies
Move through the letters. Each one wears a real Mark.Touch a letter to see its Mark.One name. Ten Marks inside it.
© 2026 Gradiently