search-img-tags

Search image urls from <img> tags from any HTML content

Usage no npm install needed!

<script type="module">
  import searchImgTags from 'https://cdn.skypack.dev/search-img-tags';
</script>

README

search-img-tags

Build Status

Search image urls from <img> tag from any HTML content

Install

npm install search-img-tags

Usage

const SearchImgTags = require('search-img-tags');

const HTML = '<img src="https://github.com/arshadkazmi42"><a></a><b>Test</b><a href="https://google.com" />Click Here</a><p>This is a paragraph</p><a target="_" href="arshadkazmi42"><img src="test.png" /><img target="_" src="/images/1.png">';

const links = SearchImgTags(HTML);
console.log(links);
// [
//   'https://google.com',
//   'arshadkazmi42'
// ]

Contributing

Interested in contributing to this project? You can log any issues or suggestion related to this library here

Read our contributing guide on getting started with contributing to the codebase

Contributors

Thank you to all the contributors who have helped us in making this project better :raised_hands: