The image tag does not show the image at my iPhone, but does in the browser

Hi

I have a page where I show an image using the image tag ( ). The src refers to an api of mine generating the image when requesting it.

When I use ionic serve to run the app in the browser, the image is shown nicely (both safari and chrome), however when I run the app on my iPhone, it does not show.

I can see the image on the phone when I put the url into the browser though.

What have I done wrong?

same problem here…

If you can paste some code, it can be more helpful.

I manage to solve it myself. The problem was that the URL were not on the list of trusted sites.
I made a filter called trustAsResourceUrl (actually snatched it from the net):

.filter(‘trustAsResourceUrl’, [’$sce’, function($sce) {
return function(val) {
return $sce.trustAsResourceUrl(val);
};
}]

And I used it in my HTML:
img ng-src="{{profile.image | trustAsResourceUrl}}" alt="…"> </img

Now stuff works