I\'ve created an AngularJS application that loads images from an OAuth secured backend. My OAuth library is configured by adding an extra interceptor to the Angular $h
The ngSrc
directive just controls the usual src
attribute for an img, which makes the browser request the image just like any other image, not via Javascript, so I don't think this can be intercepted.
However, what you could do, is write a new directive, save httpSrc. This then can fetch the image using a call to $http
, and then create a data URI with the response using something like Using raw image data from ajax request for data URI (although I'm not sure of the browser support for it).