Skip to content

Global Config Reference

Back to Configuration overview.

PropertyTypeDefaultDescription
outputDirectorystring"heroshots"Output directory for screenshots (relative to config file)
outputFormat"png" | "jpeg""png"Image format for all screenshots
jpegQualitynumber80JPEG compression quality (1-100), only used when outputFormat is "jpeg"
browserobject-Default browser settings applied to all screenshots
browser.viewportobject-Browser viewport dimensions
browser.colorScheme"light" | "dark"-Color scheme for capture. Omit to capture both light and dark variants
browser.deviceScaleFactornumber-Device pixel ratio (1 = standard, 2 = retina, 3 = ultra-high DPI)
browser.bypassCSPboolean-Bypass Content-Security-Policy restrictions. Enabled by default for reliable page.evaluate() calls
browser.reducedMotion"reduce" | "no-preference"-Emulate prefers-reduced-motion media feature. Use "reduce" to disable animations
browser.userAgentstring-Custom user agent string for the browser
workersnumber-Number of parallel capture workers (default: 1)
screenshotsobject[][]Screenshot definitions
screenshots[].idstringautoUnique identifier (auto-generated if omitted)
screenshots[].namestring-Display name, also used to derive the output filename
screenshots[].urlstring-Full URL of the page to capture
screenshots[].selectorstring-Element selector for capture (omit for full-page). Supports Playwright selector formats: CSS (.class, #id), shadow DOM (host >> child), XPath (xpath=...), text (text=...), role (role=button[name="OK"]), and chained selectors.
screenshots[].paddingobject-Expand capture area beyond element bounds
screenshots[].scrollobject-Saved scroll position (not used during capture - scrollIntoView is used instead)
screenshots[].paddingFill"inherit" | "solid" | "transparent"-Background fill for padding area: "inherit" (default) shows page content, "solid" fills with detected background color
screenshots[].paddingColorstring-Custom color for padding fill when set to "solid" (hex, defaults to auto-detected background)
screenshots[].elementFill"original" | "solid" | "transparent"-Background fill for element area: "original" (default) keeps actual background, "solid" replaces with detected color
screenshots[].elementColorstring-Custom color for element fill when set to "solid" (hex, defaults to auto-detected background)
screenshots[].viewportsstring[]-Viewport variants to generate — preset names ("desktop", "tablet", "mobile") or custom "WIDTHxHEIGHT"
screenshots[].textOverridesRecord-Replace text content before capture. Keys are CSS selectors, values are replacement text
screenshots[].annotationsobject[]-Visual annotations drawn over the screenshot (arrows, rectangles, ellipses)
screenshots[].borderWidthnumber-Border width around capture area in pixels (default 0)
screenshots[].borderColorstring-Border color (hex, default "#000000")
screenshots[].borderRadiusnumber-Corner radius in pixels — rounds the screenshot corners with transparency (PNG only)
screenshots[].actionsany[]-Ordered list of actions to execute before capturing. Actions run sequentially.
hiddenElementsRecord-Elements to hide per domain (hostname → CSS selectors)

Example

json
{
  "outputDirectory": "screenshots",
  "outputFormat": "png",
  "jpegQuality": 80,
  "browser": {},
  "workers": 4,
  "screenshots": [],
  "hiddenElements": {}
}