Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229591

Set base64 image to src

$
0
0

Hi, I’m trying to set a base64 image to the src, I have the value in Ionic Storage, but the image is not displayed.

Note: First I need to display an image located in my app resources, but when some data is processed I need to change the image to the new base64 image

this.storage.get("details").then(val => {
   this.user_img=  this._sanitizer.bypassSecurityTrustResourceUrl(val.user.img);
   console.log(this.user_img);
 });

But I’m still having this warning: WARNING: sanitizing unsafe URL value data:image/png;base64, (see http://g.co/ng/security#xss)


Viewing all articles
Browse latest Browse all 229591

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>