Skip to main content

Webshot

@taylor/webshotv2026.10.11.1· 2d agoBEHAVIORSACCEPTED WARNINGS
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.

02Behaviors1
@taylor/webshotv2026.10.11.1webshot.ts

Global Arguments

ArgumentTypeDescription
backend?enumWhere Chrome runs: a fresh Docker container per capture, or a locally installed browser
image?stringDocker image exposing the DevTools protocol on port 9222 (docker backend)
fonts?enumnoto: layer Noto fonts (incl. emoji and CJK) onto the image, built locally once; basic: use the image as-is (docker backend)
dockerPath?stringDocker CLI binary (docker backend); any docker-compatible CLI works
chromePath?stringPath to a Chrome/Chromium binary (local backend). Defaults to $CHROME_PATH or the first common install location found.
viewportWidth?numberBrowser viewport width in CSS pixels
viewportHeight?numberBrowser viewport height in CSS pixels (also the scroll step size)
deviceScaleFactor?numberDevice 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
ArgumentTypeDescription
urlstringURL of the page to screenshot (http or https)
name?stringData instance name for the PNG. Defaults to a slug of the URL host. Must not end in -capture.
scrollDelayMs?numberPause after each scroll step to let lazy content load
settleMs?numberExtra wait after scrolling back to the top (and hiding overlays), before capturing
maxHeight?numberCap on captured page height in CSS pixels (guards against infinite scroll)
timeoutMs?numberOverall timeout for loading and capturing the page
hideFixed?booleanHide position:fixed overlays (cookie banners, chat widgets, pinned bars) and unstick sticky elements so they don't float mid-image
format?enumImage format. Only png supports pages taller than one capture; jpeg/webp are cut at the single-capture limit and marked truncated.
quality?numberCompression quality for jpeg and webp (ignored for png)
failOnHttpError?booleanFail 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

05Platforms
06Labels