Format Guide
PNG for Web Performance
PNG is the right format for many use cases โ but it is also one of the easiest formats to misuse in ways that quietly destroy page speed. This guide explains when PNG is the correct choice, when it is not, how PNG affects Core Web Vitals, and the practical steps to optimize it when you do use it.
When PNG is the right choice
Use PNG when any of the following apply to your image:
- Transparency is required. PNG supports a full 8-bit alpha channel. If any pixel must be partially or fully transparent โ logos on colored headers, UI overlays, cutout images โ PNG is your format.
- Sharp edges and text. Screenshots, UI mockups, diagrams, and illustrations with hard edges and solid colors compress extremely well in PNG and retain pixel-perfect sharpness. JPG and WebP lossy modes blur these edges.
- Lossless is non-negotiable. Legal documents, product labels, medical imagery, and technical drawings often require pixel-exact reproduction. PNG guarantees that.
- Small images with limited colors. Icons, thumbnails, and simple graphics with fewer than 256 distinct colors compress to tiny file sizes as PNG-8. Often smaller than equivalent WebP.
When NOT to use PNG
PNG is the wrong choice in these common scenarios โ and this is where most web performance problems originate:
- Photographs. A photo saved as PNG is typically 5โ20ร larger than the same image as a well-optimized WebP. There is no perceptual quality benefit, only bloat. Use WebP or JPG for all photos.
- Hero banners and backgrounds. Full-width background images in PNG can easily exceed 1 MB. These are a leading cause of poor Largest Contentful Paint (LCP) scores.
- Social preview images (og:image). These are typically photographs and need no transparency. Use JPG at 85% quality or WebP โ half the size with identical visual result.
PNG vs WebP vs JPG โ at a glance
| Attribute | PNG | WebP | JPG |
|---|---|---|---|
| Transparency | Full alpha | Full alpha | None |
| Compression type | Lossless only | Lossy or lossless | Lossy only |
| Photo size (typical) | Largest | Smallest | Medium |
| Text / UI quality | Perfect | Good (lossless) | Artifacts |
| Browser support | Universal | 95%+ (all modern) | Universal |
| Best for | Logos, UI, transparency | Photos, complex images | Legacy photos, email |
Core Web Vitals impact and optimization tips
Images are the single biggest driver of poor LCP (Largest Contentful Paint) scores. If your LCP element is a PNG photograph, expect a bad score. Here is how to fix it:
- Convert photos to WebP. Use PNGmaker's PNG-to-WebP converter to batch-convert photographic PNGs. Expect 40โ80% file size reduction with no visible quality loss.
- Compress PNGs that must stay PNG. Run all logo, icon, and UI PNGs through a lossless compressor. Tools like PNGmaker's PNG compressor can reduce file size by 20โ50% with zero visual change.
- Serve responsive images. Use
srcsetto serve appropriately sized images per device. A 2400px PNG served to a 375px mobile screen wastes bandwidth and worsens CLS. - Preload LCP images. If a PNG is your LCP element (a logo or hero image with transparency), add
<link rel="preload" as="image">in the document head to start the download early. - Set explicit width and height. Always include
widthandheightattributes on<img>tags to prevent layout shift (CLS).
Try it with PNGmaker
Use the tool flow directly from this guide. The idea is simple: understand the workflow, then get to the result fast.
