image-check
v0.1.5
Published
Check if image exists and retrieve its size (based on Promise)
Downloads
6
Readme
image-check
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