I have uploaded .ico file for favicon and its working fine as favicon in all browsers. But when i try to show this .ico file in HTML image tag in IE, it is not displayed correctly. Please help.
Asked
Active
Viewed 1,875 times
1 Answers
1
IE doesn't serve favicons which doesn't have the type="image/x-icon"
on it.
So for favicons for IE, you should use this:
<link rel="icon" type="image/x-icon" href="favicon.ico" />
For showing the icon as a img
tag, the best solution I can think of is trying another format. If you are uploading the icons manually, then I would convert them with an image program.
If you a system which allows users to upload icons, then I would use the GD or ImageMagick library to convert those.

Mark Topper
- 210
- 1
- 9
-
thanks for your quick ... can you refer me some example of GB or ImageMagick library for converting .ico to .png as i searched and did nt find one. – Shaibi Rana Apr 25 '13 at 08:28
-
can you refer me some example of GB or ImageMagick library for converting .ico to .png as i searched and did nt find one – Shaibi Rana Apr 25 '13 at 09:27
-
Sorry for my misspelling, it is called GD. But here is a example of the usage of ImageMagick. `convert "favicon.ico" -thumbnail 16x16 -alpha on -background none -flatten "favicon.png"`. – Mark Topper Apr 25 '13 at 09:38
-
Is this solved? Could you then mark this as the answer? – Mark Topper Feb 23 '15 at 12:06