Back to blog

Raster vs vector: when each format wins

Choosing between raster and vector is a rendering trade, not a preference. Pick the format that matches how the graphic is consumed and both quality and file size fall into place.

What each format actually stores

Raster formats (PNG, JPG, WEBP) store a fixed grid of pixels, so quality is locked at export size. Vector formats (SVG) store geometry instructions — points, curves, fills — that the renderer recomputes at any size.

Raster — fixed pixel grid scales by duplicating pixels; edges blur Vector — geometry + math renderer recomputes the circle at any size
Same artwork, two storage models: a frozen pixel grid versus geometry the renderer recomputes at any size.
The same circle stored as a blocky pixel grid on the left and as a smooth vector circle with four anchor points on the right.

Where raster wins

Photographs, rich gradients, and texture-heavy art are inherently per-pixel data. As vectors they explode into thousands of paths that look worse and weigh more than the bitmap.

Where vector wins

Icons, logos, and line art have flat fills and hard edges — exactly what vector paths describe efficiently. They scale from 16px favicons to print billboards from one file and stay editable.

What conversion really means

Vector to raster is rendering: pick a size and the output is exact. Raster to vector is tracing: an approximation whose quality depends on the source's color structure — which is why flat artwork traces well and photographs do not.

File size at real-world scales

A vector icon weighs a few hundred bytes at any size from favicon to billboard, while a raster needs one file per size to stay sharp. A photograph, meanwhile, is smaller as a compressed bitmap than as any traced SVG that tries to approximate it.

Hybrid strategies

Real products mix both: SVG for chrome, icons, and illustration; bitmaps for photographic content inside the same layout. An SVG frame with a bitmap fill, or an SVG logo over an AVIF hero image, beats forcing one format everywhere.