Skip to content

Instantly share code, notes, and snippets.

@msure
Created August 22, 2016 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msure/3188ee802e03bbc934409d8ea70c85ce to your computer and use it in GitHub Desktop.
Save msure/3188ee802e03bbc934409d8ea70c85ce to your computer and use it in GitHub Desktop.
This Example Shows How To Locally Display Your Base64 Output As An Image
<html>
<head>
</head>
<body>
<p>Here is my image:</p>
<img id="img" src=""/>
<script type="text/javascript">
document.getElementById('img').setAttribute( 'src', 'data:image/png;base64,PASTE_THE_BASE64_OUTPUT_HERE' );
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment