Today I learned

Easily make favicon.ico

Update (2019): While this approach still works, it is more common to use other file formats for website icons, such as png's.

To create favicon.ico, you don't need anything other than ImageMagick.

brew install imagemagick
sudo apt-get install imagemagick

Creating icon files

Use it to convert .png's into .ico (use 32px and 16px sizes for retina compatibility).

convert favicon-32.png favicon-16.png favicon.ico

Resizing icons

You can even use it to generate a 16px version from a 32px:

convert favicon-32.png -resize 16x16 favicon16.png

You have just read Easily make favicon.ico, written on January 07, 2013. This is Today I Learned, a collection of random tidbits I've learned through my day-to-day web development work. I'm Rico Sta. Cruz, @rstacruz on GitHub (and Twitter!).

← More articles