Vuejs get image from remote source Vuejs get image from remote source vue.js vue.js

Vuejs get image from remote source


You can try to make some cache braking. I think that it is your browser that is caching the request and serving you with the same image. Try to append a random string at the end of the request like this:

 methods: {    getImage: function() {        var max = 90000;        var min = 10000;        var slug = Math.random() * (max - min) + min;        vue.styleObject.background = 'url(https://unsplash.it/1920/1080?random&s=' + slug +')';    }  }

Hope this helps