I created a pretty multiresolution favicon.ico containing 16x16, 32x32 and 48x48 icons. They load everything pretty well in browsers or when the site is saved on the desktop.
However, the same image is also used on the website (in particular, as a toolbar icon). Currently, the 16x16 icon is also saved as png to display on the web page itself.
This seems like unnecessary redundancy to me. I would like to display favicon.ico itself on the page and delete png.
However, simply selecting the ico file will display the file with the highest resolution in the .ico container. (tested only on Ghrome for Mac).
Can I select a single icon in a .ico container? It would be great if this had syntax <img src="favicon.ico:16"/>.
If this is not supported by most browsers, it may be possible to parse the .ico file using javascript and choose the right piece of data to display? I really do not like to do this, but I would like to receive feedback on whether this is possible.
Thank.
source
share