I would like to get the image data part out of a base64 image, to alter it. I tried this : (origin : How can I strip the data:image part from a base64 string of any image type in Javascript)
let originalImage = myBase64Image
let strImage = originalImage.replace(/^data:image\/[a-z]+;base64,/, "");
The problem with the snippet is that when you alter strImage that you don't alter the originalImage. Does anyone now a way of converting the strImage back to a base64 image or a way to directly alter the image data of the originalImage?