Using .ico in an img tag

I came across the following strange behavior in Firefox when using the ico file as src in the img tag. When it opens in Firefox (latest version), it has a 16x16 format, despite the fact that the original ico format is 128x128. In another browser (Chrome, IE) everything works fine. Just open the elephant-128x128.ico in Chrome and Firefox, and you will see the difference.

<img height='128' src="http://icons.iconseeker.com/ico/cloth-dolls-icons/elephant-128x128.ico"> https://jsfiddle.net/qwx2sxzg/1/ 

or http://icons.iconseeker.com/ico/cloth-dolls-icons/elephant-128x128.ico Does anyone know how to fix this?

+5
source share
1 answer

It is best to convert ico files to a different format, as it is not compatible with all browsers.

Image format support for web browsers

There is no other workaround.

+5
source

All Articles