I'm trying to preload an image called from Unsplash URL:

```
https://source.unsplash.com/random.

```

As you can see this URL returns an URL of random image. I'm trying to preload returned image, but I can't get returned URL of selected images.

```
var image = new Image();
    image.src = 'https://source.unsplash.com/random';
    image.onload = function(){
      element.css('background', 'url('+ image.src + ') no-repeat center center fixed');
    };

```

While this works on Chrome, where changed a background image doesn't make a blank screen while loading, on Safari it won't work.

I suspect in Safari URL will be called again for another image on success event and will make blank screen for new image loading.

I'm using AngularJS, is there any way when I call random URL, I get a returned URL of the image?

Thanks!