I\'m trying to display an .ico within an image element but in Internet Explorer it does not work/show. This is my code:
You can always put the base64 representation of an icon in the src attribute. It will look like this:
where ... will be the base64 representation.
If you need a tool for conversion from icon to base64, you can use Base64.Guru encoder for example.
Here is the snippet with Google favicon encoded in the base64 representation:

If you ever need to convert an image to base64 by yourself using JavaScript, here are some good examples how to do it: How to convert image into base64 string using javascript.