Reputation: 108
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:
<img src="{{user.avatar}}">
And this is the output:
<img src="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkwy0AgiVGdIQtN6rzCewfv0KPPggzRPSVGDZfCx9K ... a4rJcMX07V9C//Z">
Can anybody understand this?
Upvotes: 0
Views: 569
Reputation: 308
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}}"/>
Upvotes: 1