Creating and adding a favorites icon (favicon.ico) to a website

Favorites icons (favicon.ico) are small icons or thumbnails, that are related to websites or website content, that are shown in the collection of favorites and in the address bar of the browser.

This is the procedure for creating a favorites icon and making a website load it.

We boot an Ubuntu computer and open The Gimp, which is a recommendable graphics editor, and create a new image with a size of 16 pixels x 16 pixels. We set the zoom level to 1600 percent and create the image. We can use all of the squares as the browsers will add a margin around the icon. When done, we save a copy of the image in the PNM format, which is the format, used by the image conversion utility, we will be using.

If not installed, we install the image conversion utility Netpbm.

We use Netpbm to convert the image to the favorites icon format.

ppmtowinicon -output favicon.ico favicon.pnm

We transfer the favorites icon to a directory of the website, set permissions as necessary and make the website load it by inserting the following links in the header section, right below the title tag. Test, that the browser can view the icon by direct path.

<link rel="shortcut icon" href="/wp-content/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/wp-content/favicon.ico" type="image/x-icon" />

Print

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.