0

In my Angular app, I'm loading some images which I download from server as base64. I can see the images in the app without problem, but I have this errors in the console:

console errors This is my code:

<img src="{{user.avatar}}">

And this is the output:

<img src="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkwy0AgiVGdIQtN6rzCewfv0KPPggzRPSVGDZfCx9K ... a4rJcMX07V9C//Z">

Can anybody understand this?

Tana
  • 108
  • 8

1 Answers1

1

Please follow following stackoverflow answer : Loading image src using a variable containing base64 data in AngularJS

I think you will find solution by reffering above link.

you need to use "src" as following:

<img data-ng-src="{{image.dataURL}}"/>
Community
  • 1
  • 1
Jainish Jariwala
  • 308
  • 4
  • 14