use img =new Image() to display Base64 toDataURL("data:image/jpg;base64, code example
Example: javascript todataurl
var image = new Image();
image.src = canvas.toDataURL();
var image = new Image();
image.src = canvas.toDataURL();