How to create a favicon
: This is not
my own work. I am not
trying to pass this how-to off as my own work, as it is posted in full here
. I simply wanted to make this useful little how-to available for all, and only linking to an offsite how-to is against forum rules. If posting the work of another (with full credit) is against the rules also, I humbly stand corrected, and promise faithfully never to do it again, honest guv'nor.
With that said, I present Matt's how-to on creating a favicon:
, which is a small, free utility for Windows, Linux, et cetera that works quite well. Extract it to c:/.
Create an image you’d like to use at a decent size (at least 32x32 pixels) in your favorite image editor. I like Photoshop so here’s what I did there:
Ctrl + N to start a new document. Choose 32x32 pixels for the size. Cram whatever you want to use in there.
Do a Save for Web (Ctrl + Alt + Shift + S) and save it as a PNG with the filename icon-32.png to the same folder as the program you just downloaded (to keep things simple). If you want to keep the size down I would recommend taking it down to 16 colors. Don’t forget transparency if you need it.
Now go back and resize the image you’re working on to 16x16 pixels (Tools → Image Size)
Save this image as a PNG with the filename icon-16.png in the same directory as the above.
Now it gets a little tricky, open up the command line. Try Start → Programs → Accessories → Command Prompt.
Navigate to the folder where the png2ico.exe file is, if you followed the directions above you can use the command cd \png2ico.
Now you just have to enter a command to roll those two PNG files you made into one nice ICO file. Here you go: png2ico.exe favicon.ico --colors 16 icon-32.png icon-16.png . You may be able to use command line completion (pressing a letter or two and then tab) to fill some of that in for you. You could potentially embed 64x64 and 128x128 pixel sizes into the icon file by just specifying additional PNGs of that size, but for a web favicon that really isn’t needed. Just remember this if you ever want to make a nice application icon. For an application icon you’d probably want to use a PNG-24 with full alpha transparency, which this tool supports as well.
Now there should be an favicon.ico file in that same folder which you should upload to the root of your site and then link to it with something like <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
Have a drink.