npm.io
0.1.5 • Published 10 years ago

image-check

Licence
MIT
Version
0.1.5
Deps
0
Vulns
0
Weekly
0
Stars
1

image-check NPM version Dependency Status

Check if image exists and retrieve its size (based on Promise)

Installation

$ npm install --save image-check

Usage

var checkImage = require('image-check');
checkImage('some image url to test').then((data) => {
    // access image attributes
    const width = data.width;
    const height = data.height;
    const url = data.url;
}).catch((err) => {
    // handle error
});

License

MIT Dongwon Lim

Keywords