{"slug": "how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to", "title": "How to download every image from a list of web pages or a scraper dataset (and convert to WebP)", "summary": "A developer built and released Bulk Image Downloader, an Apify actor that extracts images from web pages or existing scraper datasets, deduplicates them via SHA-256 content hashing, and converts them to WebP in a single pass. In local tests, 50 catalogue pages from books.toscrape.com yielded 1,000 of 1,000 covers in 4.5 seconds, and a 22-page run converted to WebP at a 400px max width shrank output from 24.9 MB to 3.8 MB. The actor is priced at $0.50 per 1,000 saved images, with failed, filtered and duplicate images free.", "body_md": "You scraped 2,000 products and every row has an `images` array of URLs. Now you need the actual files: resized, in WebP, with stable names, for a Shopify import, a product feed or an ML dataset. Or you just want every image on a list of pages. Here is what makes bulk image downloading less painful.\n\n`<img src>` alone misses most of them. Real pages use lazy-load attributes (`data-src`, `data-srcset`, `data-lazy-src`), `srcset` (take the largest candidate), `<picture>` sources, `og:image`, and JSON-LD `image` / `logo`. Read all of those.\n\n`photo.jpg?w=800` is often a WebP. `/image/12345` has no extension at all. Sniff the first bytes to know what you really got before you convert or name the file.\n\nA `minWidth` of 100-300 px removes tracking pixels, icons and spacer GIFs. Hashing the content (SHA-256) removes the same photo served under five CDN URLs.\n\nA max width of 1,200 px in WebP is usually 5-10x smaller than the original JPEG, and good enough for a store. Do it in the same pass, not as a second job.\n\nReal rows from a 3-image test run:\n\n| Format | Width | Height | Bytes | File key | \n|---|---|---|---|---|\n| jpeg | 500 | 333 | 22,803 | a210b3bb607a54f5.jpg | \n| png | 500 | 375 | 120,581 | aaa6a61e05d96ae7.png | \n| jpeg | 500 | 225 | 39,881 | 90934bfa02aad642.jpg | \n\nLocal tests: 50 catalogue pages of books.toscrape.com gave 1,000 of 1,000 covers in 4.5 s; 20 pages plus 2 Wikipedia articles and a docs site, converted to WebP at max width 400, went from 24.9 MB in to 3.8 MB out. Each row also has `fileUrl` (a signed link that opens without a token), `sha256`, `pageUrl`, `altText`, `foundIn` (`img`, `meta`, `json-ld`, `picture` ...) and `status`.\n\nI use my [Bulk Image Downloader](https://apify.com/rel8ble/bulk-image-downloader) ($0.50 per 1,000 saved images, resize and conversion included, no start fee; failed, filtered and duplicate images are free). It takes image URLs, web page URLs, or the dataset ID of another scraper's run. Product photos from a scraper's dataset:\n\n```\n{\n  \"datasetId\": \"YOUR_DATASET_ID\",\n  \"datasetFields\": [\"images\", \"variants.*.image\"],\n  \"outputFormat\": \"webp\",\n  \"maxWidth\": 1200,\n  \"minWidth\": 200,\n  \"keyValueStoreName\": \"product-photos\",\n  \"fileNaming\": \"original\"\n}\n```\n\nAll JPEG/PNG images at least 300 px wide on a list of pages, from Python:\n\n``` python\n# pip install apify-client\nfrom apify_client import ApifyClient\n\nclient = ApifyClient(\"YOUR_APIFY_TOKEN\")\nrun = client.actor(\"rel8ble/bulk-image-downloader\").call(run_input={\n    \"pageUrls\": [\n        \"https://books.toscrape.com/catalogue/page-1.html\",\n        \"https://books.toscrape.com/catalogue/page-2.html\"\n    ],\n    \"allowedTypes\": [\"jpeg\", \"png\"],\n    \"minWidth\": 300\n})\nfor img in client.dataset(run[\"defaultDatasetId\"]).iterate_items():\n    if img[\"status\"] == \"saved\":\n        print(img[\"width\"], img[\"height\"], img[\"fileUrl\"])\n```\n\nWith a named key-value store, re-running on the same pages only downloads (and charges) new image URLs, which makes it a cheap scheduled monitor.\n\nLimits: plain HTTP, no JavaScript rendering, so infinite-scroll galleries need a browser scraper first; pass its dataset here. Only download images you have the right to copy.\n\n**Using Claude, Cursor or another MCP client?** Add `https://mcp.apify.com?tools=rel8ble/bulk-image-downloader` as a remote MCP server and ask in plain English.\n\n*Disclosure: I built and maintain this actor; it is a paid Apify actor (pay per result, Apify's free plan credit covers small tests). The sample rows above are real output from test runs.*", "url": "https://wpnews.pro/news/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to", "canonical_source": "https://dev.to/rel8ble/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-convert-to-webp-1e3c", "published_at": "2026-12-04 18:36:16+00:00", "updated_at": "2026-12-04 18:44:33.331141+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["Apify", "books.toscrape.com", "Wikipedia", "Claude", "Cursor", "Shopify"], "also_reported_by": [], "takeaway": "The actor sniffs image bytes to detect real formats, filters by a 100-300px minWidth and dedupes by SHA-256, and converting to WebP at a 1,200px max width cut a 24.9 MB test set to 3.8 MB.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to", "markdown": "https://wpnews.pro/news/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to.md", "text": "https://wpnews.pro/news/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to.txt", "jsonld": "https://wpnews.pro/news/how-to-download-every-image-from-a-list-of-web-pages-or-a-scraper-dataset-and-to.jsonld"}}