Make room for better images.An independent journal
← Back to the journal
Image library 2 min read

JPEG vs. PNG vs. WebP: choosing an image format for a website

Compare JPEG, PNG, and WebP for photographs and graphics, then test dimensions, quality, and file size before publishing.

Choose a website image format by considering the image’s content, required features, and destination. A photograph and a transparent graphic may need different treatment. The smallest file is only useful if it still looks appropriate and works in the system where you intend to publish it.

Understand the basic differences

JPEG is commonly used for photographs and typically uses lossy compression. PNG uses lossless compression and supports transparency, which can be useful for graphics. WebP supports lossy and lossless compression as well as transparency. MDN’s image-format guide explains these formats and other web options, including AVIF.

Those capabilities are a starting point, not a universal ranking. The file you get depends on its dimensions, content, and export settings. Check which formats your publishing system accepts before producing a complete collection.

Choose dimensions before chasing quality settings

Find out how large the image will be displayed and what the site or publishing workflow requests. Export an appropriately sized version while keeping the original separately. Avoid repeatedly editing and exporting the same delivery copy when you can return to the original working file.

If the site produces responsive versions automatically, follow its upload guidance. A manual export designed for one layout may be unnecessary or unsuitable for that workflow.

Compare the same image

Export a representative image in two supported formats at the same dimensions. Check the file size and view both at the intended display size. Inspect text, fine edges, gradients, and areas of texture rather than judging only a tiny thumbnail.

Keep a short note of the settings you tried. A useful comparison changes one variable at a time. If you change dimensions, format, and compression together, it is harder to identify why one result looks different.

Test the actual page

Upload the chosen version to a preview and check the crop, appearance, and any transparent areas in their real context. A graphic on a pale editing canvas may look different against the site’s background. Confirm that the final page uses the intended file.

Do not claim a performance improvement solely from changing an extension. Compare the delivered files and the actual publishing behavior.

Keep delivery clear

Label the web export distinctly from print or archive versions. Use the photo handoff checklist to document what the recipient should use, and the photo-library guide to keep originals easy to retrieve.