It’s new to me?
So how long have you been able to embed images using the data: URL scheme in web browsers?
Firefox, Safari, Chrome, Opera, IE8… who else can do this? DAMMIT! How’d I miss this one? I mean, how cool is this:
Granted it’s not the most efficient means to deliver images and other data, but it’s an interesting tool to play with.
–
Ah, it’s been around, according to this RFC, since 1998. Sheesh. I can’t believe I haven’t used this before.
does this work in ie7 or do you have to use gif instead of png?
It should work with any image format so long as you properly declare the data format. For example the example in this post begins with “data:image/png;base64″ but if you wanted a GIF image you’d simply change “image/png” to “image/gif” or “image/jpeg” for JPEGs and it’d work (assuming the data is from a GIF or JPEG as well).