You can force the background image to be downloaded to the client browser using traditional javascript methods to preload the images. After downloading it, it will be cached by the client and will be displayed instantly when you edit css background-image in javascript.
Be careful, this is bad practice for progressive improvement. In other words, the look of your webpage will be limited to browser support for javascript.
Kai source share