I allow user to save image as blob on the database, when I try to load the image that the user has save , I have a problem, In my html code i try to show the image like this:
<img [src]="'data:image/jpg;base64,'+mybase64variable" />
My problem is that the image is not always in exteion jpg so how can I know which extension I´m recieving and how can I split data:image/jpg from the other part.
My base 64 string looks like this:
"dataimage/jpegbase64/9j/4AAQSkZJRgABAQAAAQABAAD/2wB..
So I need to separete dataimage/jpegbase64 this part to know the extension of the image