Last active
April 22, 2020 03:05
-
-
Save osamaqarem/338166d96e72f52cef75547d710ac748 to your computer and use it in GitHub Desktop.
Decode Base64 Image in Browser Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decode(imageString){ | |
var image = new Image(); | |
image.src = `data:image/png;base64,${imageString}`; | |
document.body.replaceWith(image); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment