In this guide

Choose an image format for the job

Compare image exports at the same dimensions and choose a format that suits the content and destination.

Direct answer

Start with the image’s intended use, then export JPEG, PNG and WebP from the same source at the same pixel dimensions so you can compare the actual downloads for size, appearance and compatibility. On the 900 by 600 practice graphic, WebP was the smallest of the tested exports, including the optional AVIF, while the PNG retained the resampled pixels exactly. Open each candidate where the recipient will see it and choose a format that preserves the details or transparency the job requires and works in that destination.

What to look for

Use this guide when a destination asks for a smaller image, a particular format, or a background that can show through. The right choice can vary between a photographic attachment, a logo, and a graphic with text. A file may look fine in a scaled preview and reveal rough edges when opened at its intended size. A small export may also be unusable if the recipient’s editor or upload process cannot open the format.

The practical decision starts with the expected view. A listing photo usually needs usable detail and predictable delivery. A mark placed on different backgrounds needs a transparency check. A screenshot showing fine text may need more careful edge inspection. Choose the checks that apply before deciding which format to keep.

The PNG version of the original cover after resampling to the tested output dimensions.
The PNG version of the original cover after resampling to the tested output dimensions.

Why it happens

Formats use different encodings. PNG can preserve the chosen pixel samples without lossy encoding. JPEG represents an opaque image and can discard some detail while compressing it. WebP and AVIF offer other encodings with their own support and controls. An encoder’s quality number describes a setting in that encoder. Treat matching slider values as a reproducible starting point for comparison, then use your eyes and the recipient’s requirements to decide whether the resulting detail is adequate.

Before you begin

Use veylunex-cover.png, the supplied 1200 by 800 graphic. Its measured size is 62,824 bytes. The test used one resampled 900 by 600 frame for all four output formats. The source contains no transparent pixels, so the byte comparison is for an opaque graphic. If you need to deliver transparency on your own asset, run a second trial with a source that has intentionally transparent areas.

Choose a destination to test and note how the image will be displayed. Look for the smallest text, sharpest transitions and shapes that must remain recognizable. These details form your review checklist. Reserve a separate filename for each candidate so a smaller result cannot silently replace a different format you still need to inspect.

Steps

  1. Identify the image content and receiving format.

    Open the original and decide whether the asset is mainly a photograph, a flat graphic, text, or a mix. Check what the destination actually imports. The practice cover gives you a repeatable graphic with solid color transitions and fine text, so review those features rather than expecting the same size ranking for a photo.

    • List any delivery requirements such as a transparent background or a specific extension.
    • If the same source goes into two different destinations, keep a distinct candidate for each.
    • A transparent asset used on a site can need a separate opaque copy for a document or email.
    • Confirm the format in the receiving application before committing to a single output.
  2. Hold dimensions constant.

    Start from the original 1200 by 800 cover and choose 900 pixels as the comparison width. Preserve its proportions to get 900 by 600. The local run resampled the image once and encoded those pixels across the formats. Use a similar workflow when you want the difference in the downloads to come mainly from encoding choices.

    • If you are using the linked resize tool, load the same original each time and keep the width fixed for the three available formats in this trial.
    • Avoid repeatedly converting an already compressed result into a different format.
    • On a graphic with alpha, use a deliberate background for an opaque JPEG and inspect the edges where the background meets the subject.
  3. Encode the candidates and reopen every download.

    Save PNG, JPEG and WebP as distinct files. In the measured run, the JPEG and WebP used quality 85. The local Pillow encoder also wrote AVIF at quality 85. That setting makes the run repeatable and lets you compare actual outputs, while each format interprets it in its own way.

    • Inspect the downloaded file with a viewer that reports size and format, or open it in the recipient’s application.
    • The lab decoded each file to check that the extension matched the format and that all outputs were 900 by 600.
    • It also compared the decoded PNG’s pixels with the resampled frame.
    • They matched exactly.
    • Keep a candidate only when you have checked what you will deliver.
  4. Compare byte counts alongside visible details.

    In the local run, PNG measured 74,755 bytes, JPEG 29,519, WebP 13,600, and AVIF 14,142. The PNG was larger than the original despite the smaller dimensions. WebP was slightly smaller than AVIF in this particular run. Review the smallest useful text, clean edges and areas of uniform color in each saved file to decide whether its byte reduction suits the job.

    • Use the same view size when comparing two files side by side.
    • Inspect a full-size file as well as the thumbnail if the recipient may zoom.
    • For transparency, place the output against more than one background and inspect its outline.
    • The cover fixture’s byte comparison alone does not establish how an encoder handles your transparent asset.
  5. Pick the output for that destination and describe it plainly.

    Choose the smallest candidate that meets the receiving format requirement and the appearance checks. Keep a lossless copy when the purpose calls for exact resampled pixels. Choose an opaque JPEG when it meets a destination’s needs and the visual trade-off is acceptable. Test a WebP or AVIF upload where you intend to use it before sharing that version.

    • Use a descriptive filename and the extension that matches the actual encoding.
    • Keep the original so you can make another version at a different size or format.
    • If the recipient cannot open your preferred candidate, send the verified fallback copy and specify which file is intended for which application.

Check your result

After downloading, check dimensions, format, byte size and appearance in that order. First confirm that every test candidate is 900 by 600, so the comparison does not mix a size change with an encoding change. Then open the files and compare the same details. If you are testing pixel fidelity for the PNG, decode it and compare against the resampled pixel buffer. For the other formats, inspect the areas that matter at your actual display size and test the intended upload.

The table below comes from the fresh local exports, including the optional AVIF download. The earlier reference exports shown with the article were also reopened and checked for dimensions and file fingerprints. Their byte sizes differ because they came from another encoder. The sample downloads and measurement record identify which files belong to each run.

Measured verification table4 verified cases
FormatDimensionsBytes
PNG900 × 60074755
JPEG900 × 60029519
WEBP900 × 60013600
AVIF900 × 60014142

Compare the actual image exports

Created with this site’s tool in Chrome 156.0.8078.74 on . Download the files to inspect the result yourself.

One original practice graphic, resized from 1200 × 800 to 900 × 600 pixels. JPEG and WebP use quality 85; PNG has no quality setting.

Original Veylunex practice graphic exported as JPEG at 900 by 600 pixels
JPEG25,181 bytesQuality 85Download JPEG
Original Veylunex practice graphic exported as PNG at 900 by 600 pixels
PNG69,482 bytesLossless PNG encodingDownload PNG
Original Veylunex practice graphic exported as WEBP at 900 by 600 pixels
WEBP13,382 bytesQuality 85Download WEBP

In this example, the resized PNG is larger than the source (62,824 bytes). Different encoders and image content can change file size. These measurements describe this graphic and browser; equal quality numbers do not mean equal visual quality across formats.

Common mistakes

Changing width between formats. Keep dimensions fixed when asking which encoding best suits a specific output. Test different widths in a separate pass.

Treating a lower byte count as the entire result. Check hard edges, small lettering, color and the real destination’s support before selecting the smallest file.

Expecting one format to win every comparison. Use your own inputs. For the measured cover at the tested settings, WebP took fewer bytes than AVIF and the resized PNG exceeded the original size.

Changing the extension in the filename to satisfy a format request. Encode the file in the required format, then reopen it and verify that the decoder reports that format.

Limitations

The measured sizes apply to one cover graphic, one width and specific encoders. Relative quality, transparency handling and compatibility depend on the input and destination. Confirm support before choosing an optional export format for a production delivery.

Test record

Tested on 2026-11-23 with Pillow 13.0.0 under Python 3.14.4. We decoded each export at the same size and measured its actual bytes. The PNG matched the resampled source pixels, and WebP was the smallest in this test.

The measurement record lists the local outputs and their SHA-256 digests.

Tested in

  • Windows 10.0.22631, Pillow 13.0.0
  • Windows 10.0.22631, Python 3.14.4

Questions

Why is the smaller PNG larger than the source?

Pixel count and compressed byte size measure different things. The source and export used different encodings of their respective pixels. Compare both byte sizes on the actual files, then decide whether exact resampled pixels are useful for the delivery.

Should I choose WebP because it was smallest in the test?

Use it if your destination accepts it and the exported detail meets your needs. Run the same comparison on your actual input. A photograph, a transparent badge and a text graphic may reward different choices.

Can I keep a transparent background in JPEG?

Choose a format that supports the transparency you need and verify the result against different backgrounds. For an opaque JPEG delivery, intentionally set the background and inspect the edges against that color.

Should I compare equal quality settings across formats?

Use them to document the trial, then compare what you can see and open. The quality numbers are encoder controls, so the appearance and file size at a given setting can differ across formats.

Browser-local utilityResize one image by width

Resize one image proportionally and download a local copy.

Resize one image by width