Both JPEG and GIF are bitmap formats, based on pixels. On the other hand, vector images are based on mathematical formulas.
Vectors provide some distinct advantages over bitmap images, especially for use on the Web.
The primary advantage is vector images are much smaller than bitmap images because there is no need to describe each individual pixel. The mathematical formulas that describe vectors take up much less space, and can be read much faster than individual pixels. This is key to being able to easily edit and manipulate images. Therefore, vectors don't require the hassle of juggling between compression schemes and final-display quality. Although vectors offer distinct advantages over bitmap, because images such as photographs or scanned artwork are made up of pixels, they can't be converted to vectors.