Display Image in html as Binary Data with Base64 encoding

In HTML, traditionally we use path of image file to specify image source in IMG tag.

However, we can give binary data as well as source in “SRC” attribute of IMG tag, and image will be display in html.


<IMG SRC=”data:image/gif;base64,<Binary Data>” />



Binary data in above line is ‘base64 encoded’ format of image.

One advantage of this method is that visitor never knows the PATH of image you have displayed.

Drawback of this point is that IE does not support this way to display image.


Other Technical Stuff from Siddharth:

Show current date using Javascript in web browser(Client side date in web browser



How to make custom Task Scheduler in asp.net c# using thread



Introduction to Andriod – First step towards Andriod application development


On, 27/07/2013, 27 July, 2013

Latest News

Cambridge Analytica: Facebook row firm boss suspended
Is leaving Facebook the only way to protect your data?
Cambridge Analytica: Warrant sought to inspect company
5G auction bidding starts in UK
Should social media stars face tougher advertising rules?
Facebook under fire in escalating data row
#DeleteFacebook trends in response to Cambridge Analytica
Uber halts self-driving car tests after death
BBC wants to keep FM radio for longer
School bomb threats: Disgruntled Minecraft gamer 'behind hoax'