Display an .ico within an image element <img>

jonatanes picture jonatanes · Oct 26, 2012 · Viewed 15.7k times · Source

I'm trying to display an .ico within an image element <img> but in Internet Explorer it does not work/show. This is my code:

<img src="images.ico" >

Does anybody how to make it show up in all browsers?

Answer

Ruben-J picture Ruben-J · Oct 26, 2012

Displaying an ico file in an img tag is not guarenteed to work in all browsers(and i wouldn't recommend it). Convert the ico files to another format if you want to display them on the web.