Mobile app version of vmapp.org
Login or Join
Speyer207

: How to pick which version of .ico image is favicon? I've recently discovered that *.ico files can contain multiple images. Unfortunately, I cannot seem to find any information about actually looking

@Speyer207

Posted in: #Favicon

I've recently discovered that *.ico files can contain multiple images. Unfortunately, I cannot seem to find any information about actually looking at other images in a *.ico file. What would need to be in a <link> element to pick, for example, the second image?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shakeerah822

How to pick which version of .ico image is favicon?


With regards to a favicon and an HTML link element you can't. Or rather, you don't; the system does (or should, theoretically).

Whilst an .ico file can store multiple images, the general idea is to be able to store multiple versions of the same image at different resolutions (16x16, 32x32, 64x64, etc.) and the system would choose the appropriate image as required. The small 16x16 image for the tab on a 96dpi (desktop) screen or higher depending on where it is used, browser, platform and screen dpi (retina displays etc.).

In HTML5 you have the sizes attribute where you can explicitly specify the sizes that are contained within. eg. sizes="16x16 32x32 64x64". However, I don't think browser support is particularly good at the current time.

However, Apple iOS doesn't support this multiple image .ico format, hence the requirement for rel="apple-touch-icon" and PNG format images on these devices.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme