So most image file formats have what’s called compression, where we try to reduce their file size using various math tricks. GIF contains what’s called lossless compression, meaning it stores the image exactly as is. This is compared to jpegs, which are lossy compression, this means it slightly tweaks the image to be a little different, but this comes at huge cost savings. So this is why jpegs are smaller than gifs.
If we compare it to something it should be compared to a PNG, which is lossless as well. However GIF uses a standard data compression algorithm while PNG uses one designed specifically for images. PNG’s algorithm makes some assumptions like pixels close together will usually be similar in order to better compress, GIF doesn’t.
GIF is also arguably not entirely lossless, each gif can only contain 256 different colors, this is a hard limit and why the colors on gifs usually look bad.
GIFs can also “play video.” This also makes their file size bigger, as each frame of the video is basically a new image.
Latest Answers