To bulk screenshot web pages in Docker, run a Playwright script in a container, read URLs from an input list, and save a screenshot for each page with page.screenshot(). Pin the Playwright Docker image to the same version as the Playwright package in your project: the image supplies browser binaries and system dependencies, but not the package itself.
Set up a version-matched Playwright container
Use the official Playwright Docker image for the browser executables and operating-system dependencies, then install Playwright in your project. Keep the image tag and package version aligned; a mismatch can prevent Playwright from finding its browser executable. Pin a specific image version for repeatable runs rather than relying on a moving tag. See the Playwright Docker documentation for current image tags and setup details.
As an Amazon Associate I earn from qualifying purchases.
The Docker documentation’s next set showed v1.63.0 tags when reviewed, but that is a time-sensitive example, not a recommendation to use that version now. Choose a currently available tag that matches your installed package.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Example project files
This example uses Node.js. Put the matching Playwright package version in package.json, and substitute the same version in the Docker image tag:
#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
{
"private": true,
"scripts": { "screenshots": "node capture.js" },
"dependencies": { "playwright": "<MATCHING_VERSION>" }
}
Build a small image on top of the matching official image:
FROM mcr.microsoft.com/playwright:<MATCHING_VERSION>-noble
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY capture.js urls.txt ./
CMD ["npm", "run", "screenshots"]
Replace <MATCHING_VERSION> with a real, pinned version before building. The exact tag suffix depends on the published image; check the official Docker page. If your project already has a lockfile, copy it and use the package manager’s lockfile-based install command so repeated builds resolve the same dependencies.
Rank #2
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Capture a list of URLs
Place one URL per line in urls.txt. This script visits them sequentially, saves viewport screenshots in a dedicated output directory, and writes navigation or capture failures to standard error without abandoning the remaining URLs.
Recommended Free Tools
const fs = require('node:fs/promises');
const path = require('node:path');
const { chromium } = require('playwright');
async function main() {
const urls = (await fs.readFile('urls.txt', 'utf8'))
.split(/r?n/)
.map((line) => line.trim())
.filter((line) => line && !line.startsWith('#'));
await fs.mkdir('screenshots', { recursive: true });
const browser = await chromium.launch();
const page = await browser.newPage();
const failures = [];
try {
for (let i = 0; i < urls.length; i++) {
const url = urls[i];
const filename = `${String(i + 1).padStart(4, '0')}.png`;
const outputPath = path.join('screenshots', filename);
try {
const response = await page.goto(url, {
waitUntil: 'load',
timeout: 30000
});
if (!response) {
throw new Error('Navigation did not return a main-resource response');
}
if (!response.ok()) {
throw new Error(`HTTP ${response.status()}`);
}
await page.screenshot({ path: outputPath });
process.stdout.write(`Saved ${outputPath} <- ${url}n`);
} catch (error) {
failures.push({ url, error: String(error) });
process.stderr.write(`Failed ${url}: ${error}n`);
}
}
} finally {
await browser.close();
}
await fs.writeFile('screenshots/failures.json', JSON.stringify(failures, null, 2));
if (failures.length) process.exitCode = 1;
}
main().catch((error) => {
process.stderr.write(`${error.stack || error}n`);
process.exitCode = 1;
});
The output filenames are list indexes rather than URL-derived names. This avoids unsafe path characters and collisions when distinct URLs normalize to similar strings; keep the input list alongside the output or log, as above, to map each index back to its URL.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
Build, run, and retrieve the files
- Build the image with a matching pinned version:
docker build -t bulk-capture . - Run it with a host directory mounted for results:
mkdir -p output && docker run --rm -v "$PWD/output:/app/screenshots" bulk-capture - Read the PNG files and
failures.jsonfrom the host’soutputdirectory. A nonzero container exit status means at least one URL failed, while successful captures remain available.
To change the input list without rebuilding, mount it into the container as /app/urls.txt, for example by adding -v "$PWD/urls.txt:/app/urls.txt:ro" to the run command.
Choose viewport or full-page capture
| Scope | Playwright option | Use it when | Trade-off |
|---|---|---|---|
| Viewport | page.screenshot({ path: outputPath }) |
You need the visible screen at the configured viewport size. | Content below the fold is not included. |
| Full page | page.screenshot({ path: outputPath, fullPage: true }) |
You need the full scrollable document in one image. | The resulting image can be much taller and require more storage or downstream processing. |
Playwright also supports output format and screenshot options such as the output path and image format; consult the screenshot documentation for the current option set. Select a format your downstream system accepts, and account for the dimensions and storage needs of full-page images.
Rank #4
- All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
- Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
- Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
- Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
- Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
Make bulk runs dependable
Use deterministic inputs and record failures
- Keep a stable URL list and use predictable output names so later runs can be compared or resumed.
- Record the URL, failure reason, and output filename for each result. The sample writes failures to JSON and continues through the list.
- Decide how to handle HTTP error responses. The example records non-success main-resource responses as failures; remove that check if you intentionally need screenshots of error pages.
Wait for the state your capture needs
The example waits for the page load event, which is a practical baseline rather than a guarantee that every dynamic page is visually settled. Sites that render important content later may need an explicit wait for a known selector or an intentional delay before the screenshot. Conversely, waiting indefinitely for all network activity can be unsuitable for pages with persistent requests. Pick a wait condition based on the target pages and test it against representative URLs.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsKeep visual comparisons in one environment
Browser rendering can vary with operating system, browser version, settings, hardware, power source, and headless mode. Generate baseline and comparison screenshots in the same container image and configuration to reduce environment-driven differences. See Playwright’s visual comparison guidance.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Scale concurrency by measurement
The Playwright documentation cited here does not prescribe a universal concurrency, retry, or rate setting for bulk capture. Sequential processing is the simplest starting point. If the list is large, measure runtime and memory with your own pages and container limits before introducing multiple pages or workers. Respect the destination sites’ access rules; more parallel navigation is not automatically faster or appropriate.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
- Playwright cannot find a browser executable: align the package version with the Docker image tag, then rebuild the image. The image provides browsers and system dependencies, not the Playwright package.
- A URL times out: check that the container can reach the site and that the URL is correct. For slow pages, adjust the navigation timeout deliberately; if content arrives after the load event, wait for the page element needed for the capture.
- No screenshot appears for a URL: inspect
failures.jsonand container logs. Confirm that the output directory is writable and that the host mount points to the expected path. - The screenshot is blank or incomplete: verify the page loaded the content you expect before capture. Dynamic rendering may require a selector-specific wait; full-page mode includes scrollable document content but does not itself ensure delayed content has loaded.
- Images differ between runs: confirm both runs use the same pinned image, browser settings, viewport, and headless configuration. Changes in rendering environment can alter the result.
- A page is blocked or shows a bot check: the site may restrict automated access. Do not attempt to bypass its access controls; follow the site’s terms and access rules.
Or skip the browser setup
ScreenshotNeo offers a screenshot API and MCP server if you prefer not to manage a Playwright container. Its API can return a screenshot in PNG, JPEG, or WebP, or a PDF. For a single URL, make a GET request (the API parameters also support names used by other screenshot APIs, which can ease a switch):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for options and response details. Cookie banners are accepted and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before capture; these steps can each be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month without a card.
Frequently Asked Questions
Does the Playwright Docker image include the Playwright package?
No. It includes browser executables and system dependencies; install the Playwright package in your project separately.
Can I save the whole page instead of only what is visible?
Yes. Set fullPage: true in the options passed to page.screenshot().
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




