Encode a binary file – like an image, or even an MP3! – into a text URL

I discovered a URI called “data:” today which allows you to encode any amount of file data into a URL. This data could be an image, ascii text, xml data, you name it. You’ll have to read the details, but you use it like this:
data:image/jpeg;base64,base_64_encoded_jpeg_goes_here

read more | digg story

Advertisements

%d bloggers like this: