assload-image
v0.0.2
Published
Browser-side image loader for Assload.
Downloads
4
Maintainers
Readme
assload-image
Browser-side image loader for Assload.
NOTE: This is experimental software; use at your own risk. (And please report issues)
var assload = require('assload'),
loadImages = require('assload-image');
assload.use({
images: loadImages()
});
assload.bundle({
images: {
doge: 'doge.jpg',
external: 'http://example.com/image.png'
}
}).load().then(function () {
console.log('Finished loading images');
}, function (err) {
console.error(err.message);
console.error('Error event', err.event);
console.error('Image that failed', err.image);
});
License
MIT
Install
npm install assload-image --save