Sometimes you just need to generate a few screenshots. Maybe you're visually comparing dev changes, maybe you want to put screenshots on another website. This project makes generating screenshots easier.
The app uses playwright to load a browser and take a screenshot. This app can be run on Vercel.
| Name | Type | Default | Description |
|---|---|---|---|
| url | string | The URL of the page to screenshot. | |
| width | number? | 1512 | The width of the viewport. |
| height | number? | 982 | The height of the viewport. |
| scale | number? | 0.25 | The scale of the screenshot. Helpful to get a desktop screenshot, but scaled down for rendering. Max 1. |
| quality | number? | 50 | The quality of the screenshot. Between 1-100. |
| fullPage | boolean? | false | Whether to take a full page screenshot. |
| key | string? | The API key to use for the screenshot. |
Copy the .env.example to .env.local and adjust the values to your needs.
cp .env.example .env.localRun the development server:
bun install
bun devOpen http://localhost:3000 with your browser to see the result.
You probably don't want to have this open to the public. To see the authentication methods check out the .env.example. You can
lock it down by referrer, by API key, or bypass it altogether when testing locally.
Reach out to use at https://bootpackdigital.com. We're always happy to chat about projects and see if we can help.
