Embed Image Data?

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.

Advertisements

2 thoughts on “Embed Image Data?

  1. 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).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s