The raster image is defined by the arrangement of pixels in a grid with exactly what color the pixel should be.
Examples: PNG(.png), JPEG(.jpg), GIF (.gif)
Vector Images
The vector image is defined using algorithms with shape and path definitions that can be used to render the image on-screen written in a similar markup fashion.
Example: SVG (.svg)
Formats
JPEG or JPG (Joint Photographic Experts Group)
Best for Photographs
Can be compressed
lossy
lossless
do not support transparent background
PNG (Portable Networks Graphics)
Used for web graphics, like logo, illustration
inherently lossless and hence not compressed much
bigger file size
support transparent background
GIF (Graphics Interchange Format)
used for animation
inherently lossless
takes up large space and not recommended to be used