How to hack URL Shorteners to store your Images (icons)?

Note:This is not very useful hack , but lil fun


What URL shortners do? They take a long url and gives back a small one, that is
1.They can be used for compression.
2.They can be used to store any long data in short format.

As you know that an image can be represented in form of data uri as well, something like this

<img src="data:image/jpg;base64,blah blah;" />

here "blah blah" is the base64 incoded image data.

On My site I created a handler which spits a small html with img tag with the src field as whatever given to this handler in query string!

if query is a data uri then it will display the image in your browser, and this image will be hosted no where but in the URL u just created!

Since this url is long u can shorten with bit.ly and get a shorter version.

Thats it you just stored an image on bit.ly

Here is the Demo http://bit.ly/b6ZBXV