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

Capture the page with a browser automation tool such as Playwright, then upload the resulting image to your object store. For a browser client, the safest common pattern is to have a trusted backend create a short-lived, narrowly scoped presigned upload URL; the browser sends the screenshot directly to storage and never receives long-lived storage credentials.

Choose where the screenshot is captured and uploaded

There are two separate jobs: render and capture the website, then transfer the image to storage. A server-side worker can do both. If capture happens in a user’s browser, or the image should go from a web app to storage without passing through your application server, use a backend to authorize the upload and a direct browser-to-storage transfer.

Approach Where credentials live Data path Trade-offs
Backend receives the image and uploads it Storage credentials stay on the backend. Browser to application backend to storage. Simpler to centralize validation and metadata handling, but the application handles the image bytes and needs capacity for the extra transfer.
Backend issues a presigned URL; browser uploads directly Backend holds credentials and signs a constrained request. Browser gets a temporary URL, not long-lived credentials. Browser directly to storage after authorization. Avoids routing the image body through the application, but requires correct URL signing, expiration handling, and storage CORS configuration for browser uploads.

AWS documents presigned URLs for granting upload access without sharing AWS credentials. Their permissions are limited by the signing principal’s permissions, but this is an AWS behavior to verify against the policies and signing semantics of your chosen S3-compatible provider. AWS describes the URLs as bearer tokens: “As such, they are bearer tokens that grant access to those who possess them.” AWS presigned URL guidance.

Capture the website screenshot with Playwright

Playwright can write a screenshot to a file or return image bytes. It supports viewport captures, full-page captures, and element screenshots; its page API documents PNG, JPEG, and WebP output and options including full-page capture and scale. See the Playwright screenshot guide and Page.screenshot API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • 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.

Capture an image in Node.js

Install Playwright and its browser in your project, then save this as an ES module, for example screenshot.mjs. This example takes a full-page PNG and returns a buffer suitable for a subsequent upload:

import { chromium } from 'playwright';

const browser = await chromium.launch();
try {
  const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  const image = await page.screenshot({ fullPage: true, type: 'png' });
  // `image` is a Buffer; pass it to your upload code or write it to a file.
  console.log(`Captured ${image.length} bytes`);
} finally {
  await browser.close();
}

Replace the example URL with a page you are authorized to access. For a viewport-only image, omit fullPage. To capture an individual element, locate it and call locator.screenshot(). Playwright can also save directly to a file with the path option. Choose output type and scale deliberately: viewport captures are bounded by the visible browser area, full-page captures include scrollable content, and element captures isolate a selected region. A higher scale produces more image pixels and a larger file; use CSS-pixel scale for a compact screenshot and device-pixel scale when sharper output is needed.

Upload through a presigned PUT URL

For a browser upload, the application backend should authenticate the user, choose or validate the destination key, and sign a PUT request for that object. The frontend requests the URL, then sends the screenshot bytes to the returned URL. AWS documents this workflow in its presigned URL and upload references: presigned URL uploads and uploading an object with a presigned URL.

Rank #2
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.

Browser-side upload

The following browser code assumes your application endpoint returns JSON with uploadUrl and objectKey. The backend endpoint and response shape are application-specific; do not put storage secret keys in this code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
async function captureAndUpload(page) {
  const image = await page.screenshot({ fullPage: true, type: 'png' });

  const authorization = await fetch('/api/screenshot-upload', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ contentType: 'image/png' })
  });
  if (!authorization.ok) {
    throw new Error(`Could not request upload authorization: ${authorization.status}`);
  }
  const { uploadUrl, objectKey } = await authorization.json();

  const uploaded = await fetch(uploadUrl, {
    method: 'PUT',
    headers: { 'Content-Type': 'image/png' },
    body: image
  });
  if (!uploaded.ok) {
    throw new Error(`Storage upload failed: ${uploaded.status}`);
  }
  return objectKey;
}

The presigned URL is an authorization secret while valid. Return it only to the intended client, avoid logging it, and use a short expiry suitable for the transfer. A URL cannot grant more than the signer is authorized to do in AWS; temporary credentials used to sign may expire before the URL’s requested expiry. If the request was signed with a content type, send that exact type in the upload request. These AWS-specific constraints are documented in the presigned URL security guidance; check equivalent details with your storage provider.

Backend-mediated upload

If the backend already receives the screenshot, it can upload the bytes using its server-side credentials rather than issue a URL. This avoids browser CORS and presigning setup and gives the server direct control over accepted content and metadata. The trade-off is that the image body traverses your application, so account for request size limits, memory or temporary-file use, and the additional transfer. Keep credentials in server-side configuration or a secrets manager, never in browser JavaScript.

Rank #3
Sale
WD 2TB Elements Portable External Hard Drive for Windows, USB 3.2 Gen 1/USB 3.0 for PC & Mac, Plug and Play Ready - WDBU6Y0020BBK-WESN
  • High capacity in a small enclosure – The small, lightweight design offers up to 6TB* capacity, making WD Elements portable hard drives the ideal companion for consumers on the go.
  • Plug-and-play expandability
  • Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
  • SuperSpeed USB 3.2 Gen 1 (5Gbps)

Choose a key policy before uploading

In AWS S3, a PUT to an existing object key replaces that object. Pick a naming policy that matches whether the screenshot represents a current state, an archive, or a test artifact.

Key strategy Result Best fit
Stable key, such as screenshots/home.png Subsequent uploads to that key replace the prior object in AWS S3. A current screenshot that should always be addressed by one predictable path.
Unique or versioned key, such as screenshots/2026-10-03/home-unique-id.png Each capture is stored under a new key, preserving prior captures unless a lifecycle policy removes them. Archival, audit trails, or visual regression comparison.

Generate keys on the trusted backend when clients must not choose arbitrary object paths. Avoid placing sensitive user data in a key that may appear in logs or URLs. Confirm overwrite, versioning, and object-retention behavior for the specific compatible provider rather than assuming every service implements S3 semantics identically.

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.

PUT versus browser-based POST

A presigned PUT authorizes a request to one object key and is convenient when the client already has the screenshot bytes. Browser-based POST is another direct-upload option: AWS documents a web form posting content directly to S3. AWS browser-based POST uploads.

Consideration Presigned PUT Browser POST
Client request Send the image bytes with HTTP PUT to the signed URL. Submit a multipart form with the file and the signed policy fields.
Authorization scope Backend signs the operation for a chosen key; AWS permission is bounded by the signer. Backend supplies a signed policy and form fields; policy constraints depend on provider support and configuration.
Implementation Direct and compact for application code that already has bytes. Useful where form-based upload policy conditions are needed, but requires constructing and submitting the form fields.
Browser considerations Cross-origin PUT must be permitted by storage CORS rules. Cross-origin form submission and any response access must be checked against the provider’s browser-upload behavior and CORS configuration.

Do not treat these mechanisms as interchangeable in their policy details. Choose the one supported by your provider and SDK, then verify the signed operation, allowed headers, expiry, and browser behavior against its official documentation.

Configure S3-compatible endpoints and browser CORS

An S3-compatible provider may use a different endpoint, region, signature configuration, or addressing style than AWS. AWS SDK for JavaScript v3 documents configuring a client with a custom endpoint URL; that is evidence for the SDK mechanism, not proof that every compatible provider accepts identical settings. See the AWS SDK for JavaScript v3 S3 client documentation.

Before relying on a working AWS example with another provider, verify its official documentation for:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
UnionSine 1TB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • 【Upgraded version】 - The mirror logo strip is combined with the striped non-slip design. The rounded corners of the shell are more suitable for holding. The strips play a heat dissipation function to ensure a stable and fast transmission process.
  • 【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.
  • Endpoint URL and region value expected by the provider.
  • Signature version and any signing constraints.
  • Path-style versus virtual-hosted bucket addressing.
  • SDK compatibility and supported upload operations.
  • Browser CORS rules for your exact site origin, HTTP method, and request headers.
  • Maximum object size and any multipart-upload requirements.

For a direct browser upload, CORS must allow the page’s origin and the intended request. A failed preflight or blocked response may look like a network error in browser code even when the storage service received a request. Define the narrowest CORS policy that supports the application, and confirm exact syntax and behavior in the selected provider’s documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability, and cost considerations

Capture time depends on page rendering and the chosen wait condition; full-page screenshots and high-scale images can produce larger payloads than viewport captures. No universal timing, file-size, or cost benchmark is published, so measure with your target pages and provider rather than assuming a fixed budget.

  • Reduce unnecessary bytes: use viewport or element capture when a full page is not needed, and select PNG, JPEG, or WebP according to image fidelity and downstream compatibility.
  • Avoid tying up application servers: direct upload keeps the image body off your backend, while the backend still performs authorization and signing.
  • Make retries safe: if a URL expires or an upload fails, request a fresh authorization rather than exposing broader credentials. With unique keys, retries should reuse the intended key only if replacing that in-progress object is acceptable.
  • Verify completion: treat a successful HTTP response as the upload result and record the object key separately; for workflows requiring downstream processing, add an explicit confirmation step appropriate to the provider.
  • Check provider limits: object size, request limits, and multipart support vary; consult provider-specific documentation before capturing very large pages.

Troubleshooting common upload failures

Symptom Likely cause What to check or do
Browser reports a CORS or preflight error Bucket CORS does not permit the page origin, method, or headers. Allow only the required origin, PUT or POST method, and headers in the provider’s CORS settings; inspect the browser network panel for the OPTIONS preflight.
HTTP 403 or signature mismatch URL expired, key or method differs, signed headers do not match, signer lacks permission, or endpoint/signing configuration is wrong. Request a new URL; compare method, exact key, content type and other signed headers; confirm signer permissions and provider endpoint/region/signature settings.
Upload works from a server but not a browser Browser CORS or preflight behavior differs from server-side requests. Test from the actual application origin and configure the provider for that origin and request shape.
Object is replaced unexpectedly Repeated uploads use the same key. Use a unique/versioned key if history matters, or intentionally retain a stable key for latest-only behavior.
Object has an unexpected content type or upload is rejected The request’s content type differs from the signed content type, or the provider applies a content-type policy. Use the same exact content type when requesting authorization and performing the upload; verify provider policy behavior.
Upload fails after waiting Presigned URL or temporary signing credentials expired before the request completed. Obtain a new URL close to upload time; ensure the URL lifetime accounts for transfer duration and temporary credential lifetime.
SDK request targets the wrong host or bucket format Provider requires a custom endpoint or a different path-style/virtual-hosted configuration. Follow that provider’s official SDK configuration and test signing against its endpoint.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server: one GET request can return a PNG, JPEG, WebP, or PDF. Its API accepts a URL and returns a screenshot response; the screenshot can then be uploaded to your object store using the workflow above.

cURL example, saving the response as WebP (see the ScreenshotNeo documentation):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before the shot; those cleanup steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots.

Sign up for 1,000 free screenshots a month—no card required.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
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
SaleBestseller No. 3

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.