项目作者: jasonraimondi

项目描述 :
URL to PNG utility featuring parallel rendering using Puppeteer (Headless Chrome + Node.js) with storage caching via CouchDB or S3
高级语言: TypeScript
项目地址: git://github.com/jasonraimondi/url-to-png.git
创建时间: 2018-07-30T18:47:15Z
项目社区:https://github.com/jasonraimondi/url-to-png

开源协议:MIT License

下载



URL to PNG logo

URL to PNG

GitHub License
GitHub Workflow Status
Docker Pulls

A URL to PNG generator over HTTP with a fairly simple API accessed via query params passed to the server.

  • Generate PNG images from URLs
  • Customizable image dimensions and viewport size
  • Support for mobile user agent and dark mode rendering
  • Caching of generated images
  • Allow list for domain-specific requests
  • Configurable Playwright options
  • Integration with various storage providers (AWS S3, CouchDB, Filesystem)
  • Prometheus metrics endpoint

Examples






Use in your HTML

  1. <img src="http://localhost:3089?url=https://jasonraimondi.com&width=600">
  2. <img src="http://localhost:3089?url=https://github.com/jasonraimondi/url-to-png&width=600">

Getting Started

Checkout the docs to getting_started

Docker

Run the following command:

  1. docker run --rm -p 3089:3089 ghcr.io/jasonraimondi/url-to-png

On the hub: Link to DockerHub

Local Serve

Serve the project

  1. git clone https://github.com/jasonraimondi/url-to-png
  2. cd url-to-png
  3. pnpm install
  4. pnpm exec playwright install chromium
  5. pnpm dev

Configuration

Read the full config options

Encryption

Learn about encryption

Metrics

Learn about metrics

Star History

Star History Chart