Raster vs Vector
The fundamental split in digital graphics. Raster = pixels. Vector = math. This distinction determines everything about how images behave.
Raster images are grids of colored pixels. They have fixed dimensions (e.g., 1920x1080). Scaling up reveals pixels ("pixelation"). Photos are always raster — you can't describe a photo with math.
Key limitation: Raster = fixed pixels. Scale up = quality loss.
// Math describes shape, not pixels
Vector images are mathematical instructions: "draw a circle at position 12,12 with radius 10." They scale infinitely without quality loss. Logos, icons, and illustrations should be vector when possible.
Key advantage: Vector = math. Scale infinitely, perfect at any size.
Complex artwork
Screenshots
Textures
Anything photographic
Icons
Illustrations
UI elements
Anything with clean lines
The choice is usually obvious. Photos = raster. Logos = vector. The gray area is illustrations — simple ones work as vector (SVG), complex ones may need raster (PNG).
Decision rule: Photos = raster. Icons/logos = vector. Always.
<path
d="M12 2L2 7l10 5 10-5-10-5z"
fill="#3b82f6"
/>
</svg>
SVG (Scalable Vector Graphics) is XML-based — it's literally code. You can style it with CSS, animate it with JavaScript, and it's text-searchable. Perfect for icons, logos, and simple illustrations on the web.
Web standard: SVG = vector + code. Style with CSS, animate with JS.