Stuck on raster vs vector before you export a file? Use raster for photos and rich color blends, and vector for logos, icons and type that must scale cleanly.
This guide sits within our graphic design basics collection, so start there if you want the wider picture.
| Item | Key fact |
|---|---|
| Raster building block | Pixels, each holding one color value |
| Vector building block | Mathematical formulas describing lines and shapes |
| Scaling | Raster: fixed pixel count; vector: infinitely scalable |
| Typical raster formats | JPEG, PNG, GIF |
| Typical vector formats | SVG, EPS, PDF |
| High-definition photo density | 300 DPI or more |
Sources: G2 and Aalto University. Figures and format lists can change, so check the source before you rely on them.
How raster images work
A raster image is a grid of pixels, and each pixel is a small square with a single color value, as Aalto University’s design guide explains. Every digital photo is built this way, and so are paintings made in photo-editing software.
The pixel count is fixed when the file is made. According to the Noun Project, raster images can easily become blurry when expanded, and they aren’t typically scalable.
Pixel density is usually quoted as DPI (dots per inch) or PPI. G2’s glossary entry puts high definition photos at 300 DPI or more, and standard definition photos at around 72 DPI. It also notes that browsers consider only the final dimensions of a web image, not its DPI.
Raster files have clear strengths:
- Blends and shading: more pixels mean more capability for capturing gradients and lighting nuances, according to G2.
- Natural textures: Aalto calls raster irreplaceable for organic textures such as wood, stone and landscapes.
- Photography: a camera records pixels, so a photo starts life as raster.
The cost is weight. The same G2 guide warns to keep an eye on file size, because more quality means more data.
How vector graphics work
A vector graphic describes lines and shapes with math instead of pixels. Per Aalto, anchor points set the direction of each path, and a path can carry its own stroke color, thickness and fill.
Because the shapes are recalculated at every size, a vector graphic looks its best whether it appears as a thumbnail or a hero image, as G2 puts it. That is why logos and icons live in this format.
File sizes also tend to stay small. The Noun Project says vector files are relatively small compared to raster files, since they are made of lines and dots.
Type follows the same logic. G2 points out that most fonts are designed in vector formats, so letters adapt to whatever size you need.
Vector has limits too. Aalto says rendering organic shapes photorealistically with vectors remains a challenge, which is why vector suits illustration better than photography.

Raster vs vector: the key differences
Here is how the two approaches compare on the points that matter most in daily work:
- Building blocks: raster stores pixels on a grid; vector stores paths and formulas.
- Scaling: raster begins with a preset number of pixels, while vector scales without loss of quality.
- File size: the Noun Project notes that the more pixels an image has, the larger the file is.
- Best for: raster handles photographs and detailed color; vector handles logos, icons and shapes.
- Typical formats: G2 lists SVG, EPS and PDF as vector, and JPEG, PNG and GIF as raster.
The line between formats is not always clean. Aalto notes that a PDF can be saved as vector or as raster, and G2 adds that an SVG can contain rasterized components inside it.
Which should you use for your project?
G2 offers a simple rule of thumb: use raster when image quality is the top priority, and vector for everything else. These matches follow from that idea:
- Logos and wordmarks: use vector. The Noun Project says logos call for vector graphics, while print advertisements use raster images.
- Icons, type and infographics: use vector, which Aalto names as the primary form for these elements.
- Photographs: use raster, since photos can only be raster, or at least originate that way.
- Product shots: use high-quality raster, because G2 says photo quality can make or break an ecommerce store.
- Full-screen web backgrounds: start with a raster file at high pixel density.
Most real projects mix both. A website might pair a vector logo with raster photography, which matches G2’s observation that sites usually end up with an assortment of both.
Whichever format you choose, layout still decides how a piece feels. Our guide to white space in design shows how breathing room helps both photos and vector art. The broader principles of graphic design explain why those choices work.
Converting between raster and vector
Going from vector to raster is the easy direction. Aalto notes that vector images can be rasterized by exporting them as JPG or PNG files, and the Noun Project adds TIFF as another export choice.
Going the other way is called tracing, and results vary. The Noun Project says simple designs such as repetitive patterns are the easiest to convert, compared with detailed graphics.
That guide recommends Adobe Illustrator’s Image Trace panel and also names online tools such as Vector Magic and Vectorizer. This site has no tie to any of them, so test a few on your own artwork before you commit.
Photos are the hard case. G2 reminds you that once a photograph is taken, you can’t improve its resolution, and it suggests deciding the image’s final use before you even shoot.
Common mistakes to avoid
- Stretching a small raster file. Zoom in far enough and, as Aalto observes, the pixels always start to stand out.
- Keeping a logo only as a JPEG. Keep a vector master so you can export any size later.
- Assuming every PDF is vector. The format can hold raster content, so check how it was saved.
- Believing the web resamples everything. G2 calls the idea that web images are automatically reduced to 72 DPI a myth that has been proven false.
- Expecting a trace to look like a photo. Vector rendering of organic shapes stays difficult, so keep the original photograph.
Frequently asked questions
Is a JPEG raster or vector?
Show answer
A JPEG is raster. So are PNG and GIF files, which all store color as pixels rather than paths.
Can you turn a photo into a vector?
Show answer
Partly. Tracing software can outline a photo into shapes, but flat artwork with few colors converts far better than a detailed picture.
Is an SVG always vector?
Show answer
Not strictly. It is one of the most used vector formats, yet G2 says it can embed raster pieces, so open the file if it matters.
Does a logo have to be vector?
Show answer
It should be. The Noun Project’s design tip is to build a logo meant for different sized displays as a vector file for better scalability, then export raster copies as needed.



