By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

GIF

About the GIF format, and for what it is best used.

Edited: 2015-09-04 22:52

The Graphics Interchange Format known as the GIF file format is a 256 colored image file, with support for binary transparency, perhaps also known as index transparency by some, and animation. It is mostly used for graphics on the internet, but has largely been replaced by the PNG format, which typically offers better compression.

GIFs are not suited for photo's due to its limited colors, use JPEG or PNG instead, depending on your needs.

The GIF format uses the .gif file extension.

The GIF mime type is:

image/gif

GIFs used for animations

GIF animations can be used for small transition effects when using :hover in CSS. For LOGOs and larger animations, flash might be a better option due to GIFs tending to use a lot of CPU.

Since GIFs are limited to 256 colors, one might want to consider the APNG or MNG formats, if those gain better support in browsers. The alternative is to use flash, CSS3 animations, or JavaScript.