L logiover
developer-tools · May 22, 2026 · 5 min read

How to Extract Every Image and Media Asset From a Website in 2026

A practical guide to crawling a whole site and inventorying every image, video and audio asset with alt text and dimensions — for AI datasets, SEO and migrations.

Most “image downloader” browser extensions grab the images on the one page you’re looking at. That’s fine for a single page. It’s useless when you need every image across a 2,000-page site — with captions, dimensions, and the page each one came from — to build a training dataset, run an image-SEO audit, or inventory assets before a migration. For that you need a crawler that walks the whole domain and emits a clean row per asset. This guide covers what’s worth extracting, how the crawl finds media that lazy-loading hides, and the per-asset economics.

What’s worth extracting

Images live in far more places than a naive <img src> scrape will find. A thorough media crawl should pull from all of these sources:

  • <img> tags — the obvious one, including srcset (responsive variants) and <picture> <source> elements.
  • Lazy-loaded attributesdata-src, data-srcset, and friends, where the real URL hides until scroll.
  • Video and audio<video>, <audio>, their <source> children, and poster thumbnail references.
  • CSS background imagesbackground-image: url(...) in inline styles, which carries a lot of hero and decorative imagery.
  • Meta / social images — Open Graph and Twitter card images, plus favicons and touch icons.

For each asset, the metadata that makes the inventory useful:

  • Source page — which page it appeared on.
  • In-page location — was it an <img>, a CSS background, a meta tag?
  • File type / extension.jpg, .webp, .mp4, .svg.
  • Alt and title text — the caption, which is gold for accessibility audits and multimodal AI datasets.
  • Declared dimensionswidth/height attributes when present.
  • Loading behavior — eager vs. lazy.
  • Crawl timestamp.

A row-per-asset inventory like this is directly usable as a dataset, an audit spreadsheet, or a download manifest.

How the crawl finds everything

The crawler starts from one seed URL, parses each page’s HTML, and follows internal links to discover the rest of the site — domain-scoped so it stays on the target. On each page it parses every media source listed above, resolves relative URLs to absolute (so /img/hero.jpg becomes a fully qualified URL you can fetch later), and deduplicates so the same logo on every page doesn’t produce 2,000 identical rows.

Crucially, it’s a pure-HTTP crawler — no headless browser. That raises an obvious question: how does it catch lazy-loaded images if it never renders JavaScript? The answer is that lazy-loading frameworks almost always put the real URL in a data-* attribute in the server-rendered HTML; the JS just promotes it to src on scroll. By parsing those attributes directly, the crawler gets the URLs without paying the cost of rendering. High concurrency over plain HTTP is what lets it inventory thousands of pages fast.

Run the Website Image & Media Crawler — crawls a whole site and returns a deduplicated, row-per-asset inventory of every image, video and audio file with alt text, dimensions and source page. No login, no browser.

Output schema

{
  "asset_url": "https://example.com/img/products/widget-blue.webp",
  "source_page": "https://example.com/shop/widgets",
  "location": "img",
  "file_type": "webp",
  "alt": "Blue widget on white background",
  "title": null,
  "width": 800,
  "height": 800,
  "loading": "lazy",
  "crawled_at": "2026-05-22T11:30:00Z"
}

The location field matters more than people expect. An image SEO audit cares about <img> alt coverage but probably doesn’t care about CSS background decoration. A migration inventory cares about everything. Keeping the source location lets you filter for the job at hand.

Use cases

  • AI / ML training datasets. Image-plus-alt-text pairs are exactly what multimodal models train on. A crawl of an alt-text-disciplined site yields thousands of clean caption pairs.
  • Image SEO and accessibility audits. Filter for <img> rows where alt is empty to get a punch list of accessibility and image-SEO gaps.
  • Pre-migration asset inventories. Before moving platforms, you need to know every asset that exists so nothing 404s after the move.
  • E-commerce and competitor research. Pull a competitor’s full product imagery, or your own catalog, into one manifest.
  • Bulk download lists. The deduplicated absolute-URL list is a ready-made manifest for wget, a downloader, or a pipeline that fetches and processes each file.

Cost math

Pricing is pay-per-event with a small per-run start fee and zero per result — which is the whole reason this approach scales. Image extraction is intrinsically high-volume: a media-rich site routinely yields five to ten assets per page, so a 2,000-page crawl can produce 15,000–20,000 asset rows.

  • 2,000 pages, ~18,000 deduplicated assets.
  • One run, results free.
  • You pay essentially the Actor start plus HTTP compute.

The seed-URL-in, thousands-of-assets-out shape is precisely where free-per-result pricing pays off. There’s no per-image tax discouraging you from doing the complete inventory you actually need.

Common pitfalls

  • CDN URL rotation. Many platforms hash asset URLs and rotate them. Store the URL but don’t assume it’s permanent — fetch promptly if you’re downloading.
  • Hotlink protection. Some servers block requests for images that lack a matching Referer. The inventory will list the URL, but downloading may need extra headers.
  • JS-injected images with no data-* URL. Rare, but some single-page apps build image URLs entirely client-side. Those won’t appear in an HTTP-only crawl.
  • Tracking pixels and 1×1 spacers. You’ll capture decorative junk too. Filter on dimensions if you only want real imagery.
  • Licensing. Inventorying URLs is one thing; downloading and reusing copyrighted images is another. Know the rights before you build a dataset.

Wrapping up

A one-page extension is fine for grabbing a handful of images. When you need the whole site — captioned, deduplicated, and labeled by source — run a crawler that does it in one pass. With free per-result pricing, the complete inventory costs about the same as a partial one, so there’s no reason to settle for less.

Open the Website Image & Media Crawler on Apify — full-site media inventory with alt text and dimensions, deduplicated, one row per asset. Start with Apify’s free monthly credit.

Related guides