Tuesday 14 August 2007

Favicon

LOADING ...

<link rel="shortcut icon" href="http://x.com/favicon.ico"
      type="image/x-icon">

<link rel="icon" href="http://x.com/favicon.ico"
      type="image/x-icon">


Note:
  • The link elements must be inside the head element, between
    <head>
     and
    </head>
    .
  • For XHTML, the link element must be terminated by
    />
     instead of
    >
    .

Recently, some browsers such as Firefox and Opera also support other image format, such as GIF and PNG, which allows animated/transparent images (GIF) and partially transparent images (PNG). For GIF/PNG files, use the following type:
  • GIF files
    type=”image/gif”

  • PNG files
    type=”image/png”


Most photo sharing website such as Photobucket and Flickr currently does not support ICO files though, so unlike the regular images (JPG, GIF, or PNG files), favicon ICO files should be stored elsewhere. On contrary, most web hosting services, such as Geocities, allows you to store ICO files. So, look for web hosting services for a place to store the favicon ICO files.


Resolution and Color Depth
  • ICO: include multiple resolutions (the most commonly used being 16×16 and 32×32) and bit-depths (most common being 4-bit 16 colors, 8-bit 256 colors, 24-bit 16 million colors, and 32-bit 16 million colors with 8-bit alpha channel).
  • GIF: use 16×16 resolution in 256 colors.
  • PNG: use 16×16 resolution in either 256 colors or 24-bit.

As most recent browsers support ICO files, but some of them do not support GIF/PNG files, it is recommended to use ICO files whenever possible.


Create favicon
Usually favicon.ico file contains 2 icons, 16x16 and 32x32 resolution. Some graphics editor applications support ICO files, such as GIMP. Some others may require additional plugins in order to support ICO files, for example, Photoshop requires a plugin from Telegraphics. The same website also provides tool to combine multiple ICO files, e.g. combine ICO file with 16x16 and 32x32 resolution.

First begin with 32x32 resolution, as it is more difficult to work with the smaller 16x16 resolution. With your preferred graphics editor, start your project with a canvas set at 32x32. It is possible to start with a bigger canvas, such as 64x64, and scale it down once finished. However scaling down an image usually will reduce its quality.

Once familiar with the 32x32, you may proceed with the 16x16.


Inspiration
Some nice collection of favicon can be found at Smashing Magazine.

1 Comment:

Anonymous said...

Thanks for these tips. Really helpful!