An open API service indexing awesome lists of open source software.

https://github.com/fabioricali/loadim

Very simple module that detects when an image is loaded and returns it via callback
https://github.com/fabioricali/loadim

load-image load-image-asynchronously

Last synced: 9 months ago
JSON representation

Very simple module that detects when an image is loaded and returns it via callback

Awesome Lists containing this project

README

          

# loadim

Very simple module that detects when an image is loaded and returns it via callback.








## Installation
```
npm install --save loadim
```

## Usage
```javascript

const loadim = require('loadim');

loadim('image.jpg', (err, image) => {
if(err)
throw err;
else
document.body.appendChild(image);
});

// CrossOrigin option

loadim('image.jpg', {crossOrigin: 'anonymous'}, (err, image) => {
if(err)
throw err;
else
document.body.appendChild(image);
});
```

## Changelog
You can view the changelog here

## License
loadim is open-sourced software licensed under the MIT license

## Author
Fabio Ricali