Remova o tipo MIME da base64 JavaScript
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");
Arrogant Angelfish
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");