image-url-parser
v0.2.1
Published
Extract the image URLs from a given HTML document (including CSS background images)
Downloads
4
Readme
image-url-parser
This module will help extract the images used in a web page. It currently handles:
- IMG tags within an HTML document
<img src="path/to/image.jpg">
. - Images specified as
background-image
values in thestyle
attribute of an HTML element. - Images specified as
background-image
values in the CSS connected to a particular element.
Using this on a document or HTML string will return an arry containing all the unique values for the given document.
Installation
npm -i image-url-parser
Testing
mocha
License
MIT © Andrew Holloway