Usuń typ MIME z Base64 JavaScript
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");
Arrogant Angelfish
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");