Back in the embryonic stage of the Internet’s development, gif files became a standard graphic format. They were around even before JPEG. Today gif is still considered the “safest” image format for the web that supports transparency.
I hate gif files.
I mostly use only 2 image formats for the web: jpg and png. I only use gif files for simple animation. In most cases, jpg just looks better. But what about transparency? If you need transparency, png kicks gif’s sorry butt.
“What’s so bad about gif files?” you ask. Well, let me show you. Let’s say you want to put a graphic, a logo for instance, over a multicolor background. You could create a single image that includes the background and the logo. That works in some cases, but what if the exact position of the logo isn’t certain? Say, for example, a centered layout with some kind of textured background. Then you need to give your logo a transparent background.
If you do this with a gif file, it might look something like this lovely rendition of the Graphic Geek logo, over this even lovelier background:
That works, except the edges of the graphic look like you could use them saw through drywall. Maybe if we give the gif a neutral gray matte it will help:
Ok, that looks good in some places, but even worse in others. You could spend hours trying to find just the right outline color that might make the graphic almost work, or you could just use a png file, and get this:
You see how much better that is? It’s pretty obvious that the png is gif’s more talented cousin. In most cases png even has smaller file sizes. So why do designers continue to use gifs? Ask a web designer who still uses gifs, and they will likely tell you it is for maximum browser support. However, a quick look at this list shows that the number of browsers that don’t support png is inconsequential.
There is only one browser I can think of that still has enough market share left to consider that will have problems with png, and that is the dreaded Internet Explorer 6. IE6, long the bane of web designers everywhere, will display png files, but it will ignore their transparency. But browsers, like most technology, age quicker than canines. IE6 is 11 years old, which in browser years is about 756. The Internet can’t keep this senile old browser on life support forever. Even Google has decided it’s time to pull the plug on grandpa. Other than a few specific cases, I say it’s time to pull the plug on gif as well.