PNG
PNG (Portable Network Graphics) is a raster image format that uses lossless compression, meaning the saved image keeps its full original quality with no loss of detail. It was created in the 1990s as an open, patent-free successor to the GIF format and is today one of the core web graphics formats.
How PNG works
As a raster format, PNG stores an image as a grid of pixels — a bitmap. Its distinguishing feature is lossless compression: the algorithm shrinks the file size but reconstructs it exactly as the original on decoding — unlike the lossy JPEG, which sacrifices some information for a smaller size.
The second key trait is transparency support via an alpha channel. It lets you define partial and full pixel transparency, so a PNG graphic blends seamlessly onto any background. The format also supports a wide color range, including full 24-bit color, making it versatile for interface graphics.
Practical application
PNG is the natural choice for logos, icons, interface elements, graphics with text and screenshots — anywhere sharp edges, legibility and transparency matter. For photos with smooth color transitions, JPEG is usually the better fit, yielding smaller files.
On modern sites PNG is often replaced by more efficient formats such as WebP and AVIF, which deliver similar quality and transparency at a smaller size. For graphics that must stay crisp at any scale, the vector SVG format is the alternative. Optimizing images maps directly to page load time and performance metrics. Picking the right format for each image is a small change with an outsized effect on user experience.
Powiązane pojęcia
Najczęstsze pytania
When should I choose PNG over JPEG?
Choose PNG for graphics with sharp edges, text, logos and images needing transparency — lossless compression preserves full quality. JPEG works better for photos with smooth tonal gradients, where it produces much smaller files at the cost of slight, acceptable quality loss.
