I'm trying to render an image which I have converted to base64
data:image/vnd.microsoft.icon;base64,AAABAAIAICAAA.....
Now, whatever I do, I always get
{
changingThisBreaksApplicationSecurity: 'data:image/vnd.micr.....
}
So, in my search people suggest to use bypassSecurityTrustUrl
or bypassSecurityTrustResourceUrl
, but both produce the same result. I've also seen people suggesting
<img src="{{base64}}">
But this is no different than <img [src]="....">
, it produces
<img src="unsafe:data:image/vnd.microsoft.icon;base64,AAABA....">
(Note the unsafe
at the beginning)
And I have seen suggestions to use
<img [src]="safeUrl.changingThisBreaksApplicationSecurity">
But this doesn't feel right.
Any suggestion how to properly render this base64 image?