Validate Image URL
Checks asynchronously whether an image URL is valid or not.
By default, if an image URL is invalid, the browser would show the following image:
In that case, you might want show a different image such as:
This package tells you whether the image URL is valid or not.
Installation:
$ npm install --save validate-image-url
Usage:
const promise = // NOTE: the promise can be canceled by calling // promise.cancel()
Options:
- url - (required) image URL.
- timeout - (optional) timeout in milliseconds before canceling request and rejecting the promise. Default: 5000 milliseconds.