Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageCap

CI

Website screenshot service for Docker. Uses Playwright with headless WebKit to capture screenshots via an HTTP API.

Inspired by Manet.

Quick Start

Docker

docker build -t pagecap .
docker run -p 8080:8080 pagecap

Local

go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps webkit
go run .

Open http://localhost:8080/ for the web UI.

API

GET /?url=https://example.com
GET /?url=https://example.com&width=1280&height=960
GET /?url=https://example.com&delay=2000
Parameter Default Description
url Target URL (required)
width 640 Viewport width in pixels
height 480 Viewport height in pixels
delay 0 Wait time in ms after load

Returns a PNG image. URLs without a scheme get https:// prepended automatically.

Configuration

Env var Default Description
PORT 8080 Listen port

Releases

Packages

Contributors

Languages