title: net::ERR_INVALID_URL when setting <img> src from $http.get result
body: <p>I have a angular directive that works on img tags and loads the image dynamically as a base64 string. I use $http.get to load the image and set it into the img.src like this: </p>
  
  <pre><code>var onSuccess = function(response) {
    var data = response.data;
    element.attr("src", "data:image/png;base64," + data);
  };
  var onError = function(response) {
    console.log("failed to load image");
  };
  scope.$watch('authSrc', function(newValue) {
    if (newValue) {
      $http({
        method: "GET",
        url: scope.authSrc,
        data: ""
      }).then(onSuccess, onError)
    }
  });
  </code></pre>
  
  <p>after i set the src attribute, i get the <strong>net::ERR_INVALID_URL</strong> error.
  The string that returns from the request looks like this:
  IHDR����^tiDOT@(@@AMȯz�@IDATx��uw\�ٷ�o����G�B["...</p>
  
  <p>Any ideas?</p>
  
  <p>thanks</p>