3

I would like to make use of embedded base64 images in ie7.

Example: http://jsfiddle.net/mfPnK/

I tried including "ie9.js", without success:

http://code.google.com/p/ie7-js/source/browse/test/object-base64.html

Anyone know how to solve this? Thanks

thirtydot
  • 224,678
  • 48
  • 389
  • 349
Johan
  • 35,120
  • 54
  • 178
  • 293
  • 1
    Have you tried using an `` tag instead of `` as shown in the home page of [ie7.js](http://code.google.com/p/ie7-js/source/browse/test/object-base64.html)? – Darin Dimitrov Jan 18 '12 at 09:58
  • My (now deleted) answer wasn't true. IE9 in IE7 mode seems to support base64 embedding where genuine IE7 doesn't. – thirtydot Jan 18 '12 at 10:14

2 Answers2

3

You can't add base64 support to IE7 using a library. This is a feature that can't be added using JavaScript.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Guess so, any aternatives if i want to embed an image in ie7? – Johan Jan 18 '12 at 10:17
  • 1
    @Johan see [Images in one file under IE6 WITHOUT php](http://stackoverflow.com/questions/5663855/5664015#5664015) – Pekka Jan 18 '12 at 10:20
1

I don't think you can do this in IE7, however you can use MTHML instead to get inline images, here's a good post on it: http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/.

Mark Rhodes
  • 10,049
  • 4
  • 48
  • 51
  • My problem is that i dont know if my users will have internet connection, so i cant link to external images. And i dont want to use any other files besides my html, so i can use an image folder or similar. – Johan Jan 18 '12 at 10:20
  • I don't see why having multiple files is a problem for offline users, but if for some reason it is; the technique in the above link does enable images to be defined in the the same file as the html. – Mark Rhodes Jan 18 '12 at 10:31
  • 1
    @Johan I think this looks good and will do exactly what you need to do? – Pekka Jan 18 '12 at 10:45