26

I know you can embed images in html today with:

<IMG SRC="data:image/gif;base64,RAAA...more data.....">

But back in the day, when Netscape was a browser to implement for, there was another way of doing this. I can't remember.

Any suggestions would be appreciated.

Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192
  • neat. I didn't know you can do that! – Erik Jan 04 '10 at 20:54
  • What are you trying to do? I don't know how to embed an image like this in another way but I know lots of ways to get data into a webpage so maybe we can figure something else out? – Chuck Vose Jan 04 '10 at 21:25
  • 1
    possible duplicate of [Can I embed a .png image into an html page?](http://stackoverflow.com/questions/2807251/can-i-embed-a-png-image-into-an-html-page) – rath Oct 10 '13 at 05:16

1 Answers1

12

I don't know any other way specific to Netscape (RIP) and a quick search showed me that "IMG SRC=data:" has been supported by Netscape already in 2003.

I found out some IE specific tags that look like yours, but never used them (not sure it will help):

<img datasrc="bar" datafld="foo">

Some more info on embeded images in sources here (can help readers unfamiliar with this topic): http://www.websiteoptimization.com/speed/tweak/inline-images/

Here is a way to use "IMG SRC=data:" under IE6: http://web.archive.org/web/20080702001125/http://ddzoom.net/jsimages/out.htm

AlexV
  • 22,658
  • 18
  • 85
  • 122
  • That's actually the site I found the most useful!! Btw, when I said Netscape, I only meant to use it as a time reference, I'm actually trying to do it for IE6 ;) – Stephane Grenier Jan 05 '10 at 15:39
  • Added a link to an IE6 implementation of "IMG SRC=data:" (requires JavaScript to work): http://web.archive.org/web/20080702001125/http://ddzoom.net/jsimages/out.htm – AlexV Jan 05 '10 at 16:04
  • It's not exactly the answer I was looking for AlexV, but yours is the best so I'm giving you the credits. And you pointed to the best resource possible! Thanks :) – Stephane Grenier Jan 05 '10 at 21:05