Preload an image on a webpage
Works best with browserify!
npm install preload-img
If you know you'll need to load an image later, you can preload it upfront (when your web app loads) to make sure that it loads instantly later.
var preload =
Works best when the image has far-future HTTP cache headers set.
You can see this module in action on Magic Keyboard. Check the Network Tab in the Web Inspector to see that an image for each letter of the alphabet is loaded before the user has actually typed any letters.
MIT. Copyright (c) Feross Aboukhadijeh.