Vector graphics use geometrical primitives like points and lines based on mathematical expressions, while raster graphics are made up of grids of pixels. Raster images are commonly stored as JPEG, TIFF, GIF, BMP or PSD files. JPEG is best for photos and web while TIFF retains quality. GIF is good for animations. Vector files like AI and WMF can be scaled without quality loss. Files and images can be optimized by reducing size, bit depth and resolution to improve loading speed. Naming conventions and folders help manage large numbers of assets.