SVG vs. PNG: Vector and Raster Images
The difference between vector SVG files and pixel-based PNG files, when each one is right, and why background removal produces raster images.
SVG and PNG can both have transparent backgrounds, and both are common for logos and icons. But they're fundamentally different kinds of image.
Raster images: pixels
PNG, JPEG, WebP and photos in general are raster images. They're made of a grid of pixels. Each pixel has a colour. Enlarge a raster image too much and you see the pixels, or it becomes blurry.
Vector images: shapes
SVG is a vector format. Instead of pixels, it stores shapes: lines, curves and fills described mathematically. A vector logo can be scaled to the size of a building and stay perfectly sharp, because the shapes are redrawn at any size.
When to use SVG
- Logos, icons and simple illustrations.
- Graphics that need to be shown at many sizes.
- Website elements that should be sharp on every screen.
When to use PNG
- Photos and cutouts from photos.
- Detailed artwork with textures and gradients.
- Screenshots.
- Anywhere SVG isn't supported, such as many social platforms.
Background removal gives raster images
When you remove a background from a photo, the result is still a photo, so it's a raster image. Save it as PNG or WebP to keep transparency. Converting a photo cutout to SVG doesn't make it scalable; it either embeds the pixels inside the SVG file or tries to trace them into simple shapes, which loses detail.
Logos: find the vector original
If you need a logo at many sizes, look for an original SVG or other vector file from the designer. If you only have a JPEG, removing the background gives a usable PNG for screens. See making a logo background transparent.
Tracing
Some tools can trace simple raster graphics, like a flat logo, into vector shapes. It works for bold, simple designs, not photos.