Is there still any reason to prefer GIF over PNG when creating images for web pages?

As far as I know, these are the only reasons:

  • AnimGIF. This animation works everywhere. There's APNG format, but it's not as widely supported, and has no real editing tools.

  • 1x1 transparent graphic, assuming you care whether it's 80b or 120b. That's virtually the only case in which GIF gives smaller file size than PNG.

  • If you don't have proper tools for saving and optimizing PNG files. PNG files may contain color profiles and gamma correction information, which on the web cause more problems than they solve. It's best to have tool that removes this, making files smaller and more interoperable.

IE6 support is a red herring

The confusion comes from the fact that there are several color formats in PNG, and some of them are fully supported, and some of them are not.

  1. Paletted PNG with 1-bit transparency (like GIF): work perfectly in IE6. Without any hacks.

  2. Paletted PNG with 8-bit transparency (not possible in GIF): work partially in IE6 (degrade to 1-bit).

  3. True-color PNG with 8-bit transparency (not possible in GIF): don't work in IE6 without hacks.

I'm 100% sure. I've tested it extensively. I'm using them on my websites. I've even worked on software that manipulates those files.

In short: if picture can be saved as non-animated GIF, it will certainly work as PNG, in all browsers, without hacks.


They're useful for plugin-free animation, like Camtasia screencasts.

enter image description here

From: http://www.codinghorror.com/blog/archives/000583.html


Is there still any reason to prefer GIF over PNG when creating images for web pages?


Only that PNG is not fully supported by some older browsers like IE 6.

According to MarketShare IE 6.0 still holds an impressive 24% of the browser market share, making it the most used browser version. No doubt this is caused by the corporate adoption and traditional slow upgrade policies. But it's a reality you must be aware of.


Note however that if you create flat PNGs, you should be fine. It's alpha-channel and transparent PNGs that are not supported.