Technology

Image formats explained: when to use WebP, PNG, and JPG

Choose image formats using content, dimensions, quality, and compatibility. Learn a practical export workflow for website photos and graphics.

5 min read

Updated October 9, 2026.

For website photos, WebP is a useful starting option; JPEG remains useful when compatibility with another tool matters. For screenshots and raster graphics that need crisp text or transparency, compare PNG with lossless WebP. Keep a separate original rather than treating a compressed web export as your master file.

There is no format that produces the smallest file for every image. Make the choice using the image’s content, the required dimensions, and a visual check of the exported result.

A practical format comparison

FormatUseful forMain consideration
JPEG / JPGPhotos and broadly compatible image sharingTypical web exports use lossy compression and do not support transparency
PNGScreenshots, crisp raster graphics, transparent imagesLossless encoding can produce large files for detailed photos
WebPWebsite photos and transparent graphicsSupports lossy and lossless encoding; check the receiving application’s requirements
SVGLogos and icons created as vector artworkKeeps vector shapes scalable; a raster photo inside an SVG does not gain detail
AVIFAnother option to compare for web photosTest output quality, encoding workflow, and support in your target environment

MDN’s image format reference documents format capabilities and browser support. Check compatibility for the actual browser, email client, publishing platform, or editing tool where the image will be used.

Lossy and lossless describe the export

Lossy compression discards some image information. It can work well for photos, but inspect fine textures, gradients, and edges for visible changes.

Lossless compression preserves the encoded image data. It does not restore information removed earlier by resizing, palette reduction, or a previous lossy export. Saving a low-quality JPEG as PNG cannot recover the original detail.

WebP offers both modes and supports transparency. Google’s WebP documentation describes the encoding options. Its compression comparisons are based on particular comparisons, not a promise that every WebP export will beat every JPEG or PNG.

Dimensions matter as much as the format

A 4000 × 3000 image contains 12 million pixels; a 1000 × 1000 image contains one million. That is a 12:1 pixel-count ratio, not a guaranteed 12:1 file-size ratio. Compression, image content, and metadata affect the final file.

Choose dimensions for the display size and the screens you support. An image displayed at 800 CSS pixels wide may need a higher-resolution version for a high-density screen. Sending the original full-size photo to every phone is usually unnecessary.

Responsive images let a browser choose among supplied image sizes using information such as layout and pixel density. Google’s responsive image lesson explains why one source size is not always enough.

Quality settings are not percentages of preserved detail

An export setting of “80” is not a claim that 80% of the original quality remains. For example, WebP encoder settings distinguish a lossy quality factor from compression effort in lossless mode. Settings vary by encoder and format, so a WebP setting and a JPEG setting with the same number are not equivalent comparisons.

Start with your tool’s normal web preset, inspect the image at its intended display size, and compare a few outputs. Check small text, hair, foliage, and other fine detail. Lower the setting only while the result remains suitable for its job.

A maximum-quality lossy export is still not a substitute for an original or a lossless working file. Repeated editing and lossy re-encoding can compound visible damage; make new exports from the original when possible.

Three examples to guide the choice

A project photo. Export a correctly sized WebP and JPEG. Compare the finished surface, fine details, and file size. Keep the smaller version that meets your visual needs and works with your publishing system.

A screenshot with small text. Start with PNG or lossless WebP. Zoom to the intended display size and check legibility before trying stronger compression. Avoid enlarging a small screenshot and expecting the text to gain detail.

A company logo. If you have original vector artwork, use an appropriate SVG export where your site supports it. If you only have a raster file, compare transparent PNG and lossless WebP; changing the extension or wrapping it in SVG will not recreate vector artwork.

These are selection methods, not universal winners. A particular image or publishing system can change the result.

Keep an original and test the published result

  1. Save the original or editable master separately.
  2. Make a copy at the dimensions needed for the page.
  3. Export two sensible format or quality options.
  4. Compare actual bytes and visible detail.
  5. Check the uploaded result on a phone and desktop, including transparency against the page background.

For print or archival work, follow the requirements of that workflow instead of reusing a web export by default. For an unfamiliar converter, check which inputs it supports and how it handles your files before supplying client material.

A format change is useful when it improves the actual page. Check the finished image and the page’s loading behavior, then keep the original so you can produce a different export later.

Discuss your website

We can review image delivery as part of a website project.

Get in touch