Pages

Monday, November 19, 2012

Generate a multi-resolution favicon using ImageMagick

PNG format for favicons are supported by most browsers, but as you are all aware, the current state of the Web implies we must not only develop for "most browsers".

ICO favicons are very well supported and offer a bonus feature: multiple resolution in a single file. This way, the browser decides which resolution he prefers. This is notably useful in the era of iPads and Macbooks with high resolutions (Retina).

Here is a simple script to resize an image multiple times and combines them using ImageMagick. Should work with all supported formats of ImageMagick