October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Save Bulk Website Screenshots to Azure Blob Storage

A practical Node.js pipeline for capturing multiple website screenshots with Playwright and saving them to Azure Blob Storage, with identity, concurrency, validation, and failure guidance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright to capture each approved URL, then upload the resulting image bytes to Azure Blob Storage with the Azure Storage JavaScript SDK. For a dependable batch, give each capture a unique blob name, authenticate with Microsoft Entra ID, limit concurrent browser pages and uploads, and record successes and failures in a manifest. The example below processes a supplied URL list; it does not discover or crawl links.

Choose a capture workflow

Approach Best fit What you must account for
ScreenshotNeo Want a screenshot API rather than operating browser workers yourself. It accepts a URL in one GET request and returns an image or PDF. Its clean-shot process can accept consent banners and remove known consent platforms, newsletter popups, and chat widgets. Only clean shots are billed; review its documentation for configuration and response details.
Playwright plus Azure Blob SDK Need control over URL selection, browser context, capture settings, blob naming, and storage. You own the queue, browser lifecycle, retries, identity, retention, and monitoring. Playwright can return screenshot bytes, and the Azure SDK can upload buffers. Playwright screenshot documentation; Azure JavaScript upload documentation.
Managed bulk screenshot API Prefer a service that accepts URL lists, sitemaps, or domains and describes cloud storage delivery. AddScreenshots documentation describes Azure Blob as a possible destination. That is the provider’s description, not independent validation; check current features, security, terms, retention, quotas, regions, and price before adoption. AddScreenshots API documentation.
Azure Playwright service and reporter Screenshots are artifacts of an end-to-end Playwright test workflow. This is a test execution and reporting setup, not a general-purpose domain crawler. Reporting has workspace, storage, RBAC, CORS, Entra authentication, and Playwright version prerequisites. Microsoft Azure Playwright documentation.

The rest of this guide uses Playwright and the Azure SDK because it provides direct control over the capture-to-blob pipeline.

As an Amazon Associate I earn from qualifying purchases.

Decide scope and access before capturing

Start with URLs you own or are authorized to capture. Decide whether the job processes only an explicit list or obtains URLs from a sitemap or another source; do not let a simple screenshot loop silently become an unrestricted crawler. Set a page-count ceiling, navigation timeout, delay policy, and maximum number of simultaneous pages based on the target sites and your workload. There is no universal crawl rate or permission rule established here; respect each site’s access terms and controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Choose viewport screenshots for consistent images of the visible viewport, or full-page captures when the entire scrollable page is needed.
  • Decide how to handle redirects, consent walls, login pages, lazy-loaded content, and pages that never settle.
  • Define what can be stored. Screenshots may contain personal or confidential page content; apply appropriate access controls and retention.
  • Record the source URL, capture time, outcome, and resulting blob name in a manifest so a blob alone is not the only record of provenance.

Prepare Azure Blob Storage and identity

  1. Create or select an Azure Storage account and a blob container for the captures. Keep the container private unless public access is an explicit requirement.
  2. Give the workload identity only the data permissions it needs. For a process that writes blobs, Microsoft documents the Storage Blob Data Contributor role as an applicable data role. Scope assignment as narrowly as your deployment permits. Microsoft identity and authorization guidance.
  3. Use Microsoft Entra ID through DefaultAzureCredential rather than embedding an account key in source code. The credential can use the configured identity in supported local and deployed environments; ensure the intended identity is actually available where the script runs.
  4. Install a supported Node.js runtime and the packages playwright, @azure/storage-blob, and @azure/identity. Install the browser binaries required by your Playwright installation as well.

Run a bounded capture-and-upload batch

The following CommonJS script accepts newline-separated URLs in URLS, captures full-page PNGs, uploads each buffer, and writes a JSON-lines manifest. Install dependencies with npm install playwright @azure/storage-blob @azure/identity. Set AZURE_STORAGE_ACCOUNT to the storage account name, AZURE_STORAGE_CONTAINER to the container, and URLS to a newline-separated list of approved HTTP or HTTPS URLs. Authenticate the execution environment for DefaultAzureCredential and assign its identity the required blob data role.

#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
const { chromium } = require('playwright');
const { BlobServiceClient } = require('@azure/storage-blob');
const { DefaultAzureCredential } = require('@azure/identity');
const { createHash } = require('node:crypto');
const { appendFile } = require('node:fs/promises');

const account = process.env.AZURE_STORAGE_ACCOUNT;
const containerName = process.env.AZURE_STORAGE_CONTAINER;
const urls = (process.env.URLS || '')
  .split(/r?n/)
  .map((url) => url.trim())
  .filter(Boolean);
const runId = new Date().toISOString().replace(/[:.]/g, '-');
const maxPages = Number(process.env.MAX_PAGES || 3);
const timeoutMs = Number(process.env.PAGE_TIMEOUT_MS || 30000);
const manifestPath = process.env.MANIFEST || 'capture-manifest.jsonl';

if (!account || !containerName) {
  throw new Error('Set AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_CONTAINER');
}
if (!Number.isInteger(maxPages) || maxPages < 1) {
  throw new Error('MAX_PAGES must be a positive integer');
}

function makeBlobName(url, index) {
  const digest = createHash('sha256').update(url).digest('hex').slice(0, 24);
  return `${runId}/${String(index + 1).padStart(5, '0')}-${digest}.png`;
}

async function record(entry) {
  await appendFile(manifestPath, `${JSON.stringify(entry)}n`, 'utf8');
}

async function main() {
  const credential = new DefaultAzureCredential();
  const service = new BlobServiceClient(
    `https://${account}.blob.core.windows.net`,
    credential
  );
  const container = service.getContainerClient(containerName);
  await container.createIfNotExists();

  const browser = await chromium.launch({ headless: true });
  const queue = [...urls];
  let nextIndex = 0;

  async function worker() {
    while (true) {
      const index = nextIndex++;
      if (index >= queue.length) return;
      const url = queue[index];
      const startedAt = new Date().toISOString();
      let page;

      try {
        const parsed = new URL(url);
        if (!['http:', 'https:'].includes(parsed.protocol)) {
          throw new Error('Only HTTP and HTTPS URLs are accepted');
        }

        page = await browser.newPage();
        const response = await page.goto(url, {
          waitUntil: 'domcontentloaded',
          timeout: timeoutMs
        });
        const image = await page.screenshot({ fullPage: true, type: 'png' });
        const blobName = makeBlobName(url, index);
        await container.getBlockBlobClient(blobName).uploadData(image, {
          blobHTTPHeaders: { blobContentType: 'image/png' }
        });

        await record({
          url,
          startedAt,
          finishedAt: new Date().toISOString(),
          httpStatus: response ? response.status() : null,
          outcome: 'uploaded',
          blobName
        });
      } catch (error) {
        await record({
          url,
          startedAt,
          finishedAt: new Date().toISOString(),
          outcome: 'failed',
          error: error instanceof Error ? error.message : String(error)
        });
      } finally {
        if (page) await page.close().catch(() => {});
      }
    }
  }

  try {
    await Promise.all(
      Array.from({ length: Math.min(maxPages, queue.length) }, () => worker())
    );
  } finally {
    await browser.close();
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

This script is a practical starting point, not a guarantee that every site can be captured or that the same settings suit every Playwright version and target. The capture loop is bounded by MAX_PAGES; it does not discover links, retry failures, or wait for every network request to finish. The manifest is local to the machine running the script, so move it to an appropriate durable location if you need it after the run.

Choose the capture readiness rule

domcontentloaded avoids waiting for all subresources, but it can capture before a single-page application or late-loading image has rendered. If the page needs a specific element, wait for that selector before taking the screenshot. A fixed delay can help with known animation or rendering delays but makes every capture slower and does not prove the page is ready. Waiting for network idle is another option, but pages with long-lived requests may never reach it. Add a separate bounded wait or site-specific readiness rule where needed.

Use viewport or full-page output deliberately

Playwright’s fullPage: true captures the full scrollable page; omit it for a viewport image. Playwright also supports screenshots of a selected element and returning image bytes rather than saving a file. Those bytes can be passed to the Azure SDK upload call. See the Playwright Page API for the current capture options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Keep names unique and safe

The example names blobs with a run identifier, sequence number, and truncated SHA-256 hash of the URL. This avoids putting raw query strings or credentials into object names and reduces collisions across runs. It intentionally does not make blob names secret: use Azure access controls for that. If you want repeat runs to replace the same object, define an explicit overwrite or conditional-write policy instead of accidentally letting workers compete.

Capture to disk when files are more convenient

For large images or a workflow that already stores local files, Playwright can save a screenshot to a path and the Azure SDK can upload that file with its file-upload method. For the in-memory route shown above, uploadData accepts the screenshot buffer. The SDK also documents stream and string routes; select the method that matches the representation your pipeline already produces. See the Azure Blob JavaScript upload guide.

Scale without losing control of failures

Bound both browser work and uploads

Do not launch an unbounded page per URL. Browser contexts and pages consume memory and CPU, while uploads consume network and storage resources. Keep a bounded queue, start with modest concurrency, and adjust using representative pages and the limits of the machine and target sites. The example uses one page per worker and a configurable maximum worker count. If captures and uploads need different limits, put them behind separate bounded queues.

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Retry only errors that can plausibly recover

The example records a failure but does not retry it. In production, distinguish navigation timeouts, transient network errors, authorization failures, invalid URLs, and storage errors. Retry transient failures with a small bounded number of attempts and backoff; do not repeatedly retry permanent errors or a page that is intentionally blocked. Preserve the attempt count and final outcome in the manifest.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Avoid concurrent writes to the same blob

The Azure Storage SDK documentation says its storage client libraries do not support concurrent writes to the same blob. Give each capture a unique name, or define an explicit conditional or overwrite strategy before adding workers. Do not treat higher concurrency as safe if two workers may target the same object. See the SDK upload guidance.

Tune transfer settings with real workload data

Azure’s upload guidance describes transfer block sizing, per-transfer concurrency, and checksum options. Tune these against representative screenshot sizes and the installed SDK version rather than copying a sample value as a performance recommendation. A checksum can help validate transfers where supported and appropriate; it does not establish that the screenshot itself represents the intended page state.

Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Validate the batch and its artifacts

  • Compare the number of input URLs with manifest records and uploaded blobs.
  • For each success, verify that the blob exists and has the expected image content type.
  • For each failure, retain the URL, time, error, and any relevant HTTP status; redact secrets before sharing logs.
  • Check a sample of images for blank pages, consent screens, incomplete lazy-loaded content, or unexpected redirects.
  • Set storage access and retention according to the sensitivity and intended lifetime of the captured content.

For visual-regression tests, environment differences matter: Microsoft warns that screenshots can vary when local and remote browser host operating systems differ. Run comparisons in a consistent service environment and configure service-specific snapshot paths where needed. This issue matters less for ordinary archival captures than for pixel-by-pixel assertions. See Microsoft’s visual comparison guidance.

When Azure Playwright reporting is a better fit

Use the Azure Playwright service and reporter when screenshots and traces are artifacts of a Playwright test suite you already run, rather than outputs from a general URL-list capture job. Microsoft documents uploading HTML reports and related artifacts to workspace storage. The documented setup includes enabling reporting and selecting a storage account in workspace settings, assigning Storage Blob Data Contributor to test runners, and configuring CORS to allow https://trace.playwright.dev with GET, OPTIONS for trace viewing. Microsoft also documents Entra authentication and Playwright version 1.57 or higher as reporter prerequisites. These requirements can change, so confirm the current Azure Playwright documentation for the workspace and package version you use: Azure Playwright documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server by Yorker Media. One GET request can return a PNG, JPEG, WebP, or PDF. Its clean-shot steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses indicate the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. Review ScreenshotNeo and the API documentation for current request options and response handling.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

This downloads an image for each request; for a batch, call the endpoint for each URL and upload the returned bytes to your Azure container using your own identity and naming policy. ScreenshotNeo does not remove the need to decide which URLs to process or how to store and retain the results. It offers 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo and start with 1,000 free screenshots a month, no card required.

Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

Troubleshoot common failures

Symptom Likely cause What to check or change
Credential unavailable or authorization denied DefaultAzureCredential cannot find the intended identity, or the identity lacks blob data permissions. Check the login or managed identity configuration for the runtime, verify the storage account and container names, and confirm the identity has the required scoped data role. Do not paste account keys into logs or source files.
Navigation timeout The site is slow, blocked, or waiting for a readiness condition that does not occur. Inspect the target in a controlled browser session, choose an appropriate readiness rule, and set a bounded timeout. Record the failure; do not assume a timeout means the site is universally unavailable.
Screenshot is blank or incomplete The page may not have rendered its content before capture, may require interaction, or may defer images until scrolling. Wait for a meaningful selector or known rendering condition; consider a bounded delay or full-page mode for lazy-loaded content. Validate representative outputs rather than treating HTTP success as proof of a complete screenshot.
Upload fails after capture Identity, network, container configuration, or transient storage error. Check the recorded error and Azure diagnostics, verify write permissions and container name, and retry only plausibly transient errors with backoff. Keep the image or recapture according to your failure policy.
Existing capture is replaced or inconsistent Multiple writes target the same blob name. Include a run identifier or unique capture identifier, or implement deliberate conditional/overwrite behavior. The Azure SDK warns against concurrent writes to one blob.
Images differ between local and managed test runs Browser host OS or rendering environment differs. For visual assertions, run comparisons in the same environment and configure the appropriate snapshot path using Microsoft’s visual comparison guidance.

Plan cost and reliability around the actual workload

No throughput benchmark, universal volume limit, or comparative service price is established for these approaches here. Your own cost depends on browser compute, storage, transfer, any managed-service charges, and how long artifacts are retained. Estimate from a representative batch and verify current Azure and third-party pricing and quotas before committing to a design. Reliability depends on bounded concurrency, explicit timeouts, useful readiness checks, retry policy, unique blob names, identity permissions, and a manifest that makes partial failures visible.

Frequently Asked Questions

Does this workflow capture URLs only, or does it crawl a website?

The example processes only the URLs supplied in the URLS environment variable. Link following or sitemap discovery would need to be designed separately.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I save JPEG or WebP instead of PNG?

Yes. Playwright supports multiple screenshot formats; choose a supported type and make the filename extension and blob content type match the output.

Can a screenshot be uploaded without first saving it to disk?

Yes. Playwright returns screenshot bytes when no path is supplied, and the Azure SDK’s uploadData method accepts the resulting buffer.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.