Удалить тип MIME с JavaScript base64
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");
Arrogant Angelfish
var strImage = strToReplace.replace(/^data:image\/[a-z]+;base64,/, "");