Base64 data => invalid url :(

hej –

i have some base64 encoded images in a web sql database. everything is fine and the actual view is fine as well! but while i test my app in my browser on my desktop i get an error for every base64 image :confused:

my image tags in my templates look like this:

<img src="data:image/jpg;base64,{{image}}"/>

in my controler the image is filled with the base64 stuff from the database (using promises…)
the error in my console does look like this:

GET data:image/jpg;base64,{{image}} net::ERR_INVALID_URL 

of course the error does make sense. and actually everything is cool because the image is shown just fine!
i guess it has something to do with the promises / updating the view / stuff?

anyways … is there anything i can do so this error won’t be thrown?
really appreciate your help! thanks a lot!

damn it … sometimes it’s about the small things.
of course this error is not related to either the database, or the promises or the base64 images.

the solution: use ng-src …

<img ng-src="data:image/jpg;base64,{{image}}"/>

well … still … thanks.

thx for your share, i’m facing the same problem.

Declared like this

**<img ng-src='data:image/jpeg; base64,{{image}}' />**

having the same problem but still not solved getting error


can any one help

thanks for the information i faced the same bug now every thing is fine :smile: :smiley:

I am getting same problem