When you invoke it using Postman, or in a browser, it returns an image which is rendered beautifully. Now, from inside an app, when I use $http or jQuery to call this API, what is returned is LOTS of "garbage". Can anyone explain what this garbage is? Is it base64 encoded binary data corresponding to the image? I need this information so that I can display this image in my app.. Neither img ng-src="{{photo}}" nor img data-ng-src="{{photo}}" worked. I also tried explicitly specifying base64 in the img tag, didn't work.
Thanks!
That URL returns the binary file of the image, e.g. a JPEG file. You can use that URL as the src
of an <img>
tag directly.