Webshot
@taylor/webshotv2026.10.11.1
01README
Full-page screenshots of web pages (PNG, JPEG, WebP). Runs headless Chrome in a fresh, version-pinned Docker container with Noto fonts (or a local Chrome), scrolls to the bottom so lazy content renders, hides cookie banners and fixed overlays, stitches pages taller than Chrome's capture limit, records the HTTP status, and stores the image plus capture metadata as swamp data.
02Behaviors
@taylor/webshotv2026.10.11.1webshot.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| backend? | enum | Where Chrome runs: a fresh Docker container per capture, or a locally installed browser |
| image? | string | Docker image exposing the DevTools protocol on port 9222 (docker backend) |
| fonts? | enum | noto: layer Noto fonts (incl. emoji and CJK) onto the image, built locally once; basic: use the image as-is (docker backend) |
| dockerPath? | string | Docker CLI binary (docker backend); any docker-compatible CLI works |
| chromePath? | string | Path to a Chrome/Chromium binary (local backend). Defaults to $CHROME_PATH or the first common install location found. |
| viewportWidth? | number | Browser viewport width in CSS pixels |
| viewportHeight? | number | Browser viewport height in CSS pixels (also the scroll step size) |
| deviceScaleFactor? | number | Device pixel ratio (1-4); 2 produces a retina-resolution image |
fn capture(url: string, name?: string, scrollDelayMs?: number, settleMs?: number, maxHeight?: number, timeoutMs?: number, hideFixed?: boolean, format?: enum, quality?: number, failOnHttpError?: boolean)
Load a URL in headless Chrome, scroll to the bottom to trigger lazy content, and save a full-page screenshot
| Argument | Type | Description |
|---|---|---|
| url | string | URL of the page to screenshot (http or https) |
| name? | string | Data instance name for the PNG. Defaults to a slug of the URL host. Must not end in -capture. |
| scrollDelayMs? | number | Pause after each scroll step to let lazy content load |
| settleMs? | number | Extra wait after scrolling back to the top (and hiding overlays), before capturing |
| maxHeight? | number | Cap on captured page height in CSS pixels (guards against infinite scroll) |
| timeoutMs? | number | Overall timeout for loading and capturing the page |
| hideFixed? | boolean | Hide position:fixed overlays (cookie banners, chat widgets, pinned bars) and unstick sticky elements so they don't float mid-image |
| format? | enum | Image format. Only png supports pages taller than one capture; jpeg/webp are cut at the single-capture limit and marked truncated. |
| quality? | number | Compression quality for jpeg and webp (ignored for png) |
| failOnHttpError? | boolean | Fail without saving anything when the page responds with HTTP 4xx/5xx |
Resources
capture(infinite)— Metadata about the captured screenshot
Files
screenshot(image/png)— Full-page screenshot (PNG by default; JPEG or WebP)
03Stats
A
93 / 100
Downloads
2
Archive size
38.1 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
Repository
https://github.com/taylorific/swampworksdeno-command2 accepted
Spawns a subprocess with Deno.Command().
- models/webshot.ts:304 — launches the headless browser (local backend); fixed argument list, see README What it runs
- models/webshot.ts:348 — runs the docker CLI (docker backend); fixed argument lists, see README What it runs
05Platforms
06Labels