Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Demonstrates running Puppeteer on Vercel with a Next.js web app that screenshots any URL.

Astro landing page starter with gradient background, responsive hamburger/dropdown menu, and switchable floating/fullscreen headers.
Puppeteer on Vercel is a boilerplate Next.js application that demonstrates how to run Puppeteer headless browser screenshots inside Vercel serverless functions, with a web UI for capturing any URL.
Puppeteer on Vercel is an open-source demonstration repository published at gabenunez/puppeteer-on-vercel. It accepts a URL as input through a simple web form, calls a serverless API route, and returns a screenshot of that page. The project runs on Next.js and is designed specifically to solve the challenge of bundling Chromium for Vercel's function size limits. It provides a one-click Deploy with Vercel button that clones the repository and starts a deployment.
puppeteer package with its bundled Chromium for local development, and @sparticuz/chromium-min with a pre-packaged Chromium binary for Vercel production.postinstall script extracts Chromium binaries from @sparticuz/chromium and packages them into public/chromium-pack.tar for runtime download.page.pdf() workflows, though the template ships with screenshot capture only.The app uses a standard Puppeteer setup locally. For Vercel deployment, the postinstall script extracts Chromium binaries from @sparticuz/chromium and packages a tar file; at runtime, the API route uses @sparticuz/chromium-min to download and extract that binary, then caches the executable path. When you click Capture, the serverless function launches headless Chrome, visits the URL, and returns a screenshot.
Use the "Deploy with Vercel" button in the README, which clones the repository and creates a new project; the postinstall script packages Chromium automatically during build.
Yes, but Hobby plan functions time out after 10 seconds; for slow pages, the README recommends upgrading to Pro for higher timeouts.
Because the Chromium binary is large and functions have size limits; this template solves it by packaging Chromium into a tar file at build time and downloading it at runtime via @sparticuz/chromium-min.
The template demonstrates screenshot capture, but because it runs Puppeteer you can extend the API route to use Puppeteer's page.pdf() method; no extra Chromium configuration is needed.
If no production deployment is found, the app defaults to the provided example Chromium tar file so you can run it locally without hosting your own binary.
