Vector vs raster images
Key points
- Raster is made of pixels, vector of shapes
- Photos are raster, logos are vector
- Vector to raster is easy; the reverse is hard
Image files come in two broad kinds: raster images made of a grid of tiny dots (pixels), and vector images that record shapes as positions and curves. Knowing the difference makes it much clearer which format to use and when.
Raster: pictures made of pixels
A raster image is like graph paper with one color in each square. 1000 squares across and 1000 down is a million pixels. It suits pictures with subtle color changes, like photos.
The catch is that the size is fixed. Enlarging a 1000-pixel image to 4000 pixels means guessing colors for squares that never existed, so it looks soft or jagged. PNG, JPG, WEBP, GIF and BMP are all raster formats.
Vector: pictures made of shapes
A vector image stores instructions like "draw a line from here to there and fill this curve with blue". They are recalculated every time the image is shown, so edges stay smooth at any size. Vectors suit pictures with clear shapes: logos, icons, lettering, diagrams and illustrations.
SVG, EPS, AI and PDFs saved as vectors are the common vector formats.
Can you convert between them?
Vector to raster is easy: draw it once at the size you want and save the pixels. That is what SVG to PNG does.
Raster to vector is hard. It needs "tracing", finding edges in the pixels and turning them into shapes. Complex pictures like photos trace poorly, and even simple logos usually need manual cleanup. You can save a PNG inside an SVG or EPS file, but that just places the picture inside a vector file; it doesn't make it a vector.
How to choose
- Photos → raster (JPG, WEBP)
- Logo and icon masters → vector (SVG, EPS)
- Logos for documents or social media → a raster (PNG) exported from the vector master at the size you need
- Print → vectors where possible, and sufficiently large rasters for photos
The best habit is to keep masters as vectors and export rasters at the right size whenever you need them.