URL-to-PNG
URL to PNG utility featuring parallel rendering using Playwright for screenshots and with storage caching via Local, S3, or CouchDB.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Overview
URL-to-PNG is an open-source, self-hostable web page screenshot tool created by Jason Raimondi and released under the MIT license. It exposes an HTTP service with a simple API: pass the target URL and other options to the server as query parameters, and you get back a PNG screenshot of that page. Screenshots are rendered in parallel by Playwright, and the generated images can be cached to avoid rendering the same page again.
Key Features
- URL to PNG: Generate PNG screenshots of any web page through an HTTP request
- Adjustable size: Set the dimensions of the output image and the browser viewport size
- Mobile and dark mode: Render pages with a mobile User-Agent, and dark mode rendering is also supported
- Image caching: Generated images are cached, with a choice of storage backends: local filesystem, AWS S3, or CouchDB
- Domain allowlist: Restrict screenshot requests to specific domains to prevent abuse of the service
- Configurable Playwright: Adjust Playwright-related options
- Encryption: Supports encrypting request parameters, and the project includes an example script, example-encryption.js
- Monitoring: Provides a Prometheus metrics endpoint for easy integration with monitoring systems
Usage
Once deployed, you can put the service address directly in an image tag in your HTML to display a web page screenshot:
<img src="http://localhost:3089?url=https://jasonraimondi.com&width=600">
Deployment
Docker (recommended)
docker run --rm -p 3089:3089 ghcr.io/jasonraimondi/url-to-png
The image is published on both GitHub Container Registry and Docker Hub (jasonraimondi/url-to-png), and the repository also includes a docker-compose.yml.
Running locally
git clone https://github.com/jasonraimondi/url-to-png
cd url-to-png
pnpm install
pnpm exec playwright install chromium
pnpm dev
For the full list of configuration options, as well as encryption and metrics, see the official documentation: https://jasonraimondi.github.io/url-to-png/
Technical Requirements
- Tech stack: TypeScript / Node.js (NestJS), using Playwright to drive Chromium for page rendering
- Running locally requires Node.js, pnpm, and Playwright's Chromium browser
- Alternatively, you can install only Docker and run the image directly
- The default port is 3089
Who It's For
It suits developers and teams who need to generate web page previews in bulk or dynamically, especially when they want to run screenshot capability on their own servers instead of relying on a paid third-party screenshot API.
Highlights
- Fully self-hosted, so you stay in control of your data and requests
- The API is driven purely by query parameters, so it can be written straight into an img tag
- Choice of storage backends, fitting scales from a single machine to the cloud
Discover more
AlertHub
Get alerts from GitHub releases.
MyIP
All in one IP Toolbox. Easy to check what's your IPs, IP geolocation, check for DNS leaks, examine WebRTC connections, speed test, ping test, MTR test, check website availability and more.
MySpeed
Speed test analysis software that shows your internet speed for up to 30 days.
Reactive Resume
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.
WeTTY
Terminal in browser over http/https.
Anubis
Weighs the soul of incoming HTTP requests to stop AI crawlers