Skip to content

Releases: nicepkg/shotog

v0.6.0 — Batch Generation API

12 Feb 02:18

Choose a tag to compare

What's New

Batch OG Image Generation (POST /v1/og/batch)

Generate up to 20 OG images in a single API call. Perfect for:

  • Static site generators that need OG images for every page
  • CMS systems generating images for all blog posts
  • CI/CD pipelines creating images at build time

Request

{
  "images": [
    { "id": "hero", "title": "My Product", "template": "product" },
    { "id": "blog-1", "title": "How to X", "template": "blog", "author": "Alice" }
  ],
  "defaults": {
    "format": "png",
    "width": 1200,
    "height": 630,
    "domain": "example.com"
  }
}

Response

{
  "results": [
    { "id": "hero", "success": true, "data": "data:image/png;base64,..." },
    { "id": "blog-1", "success": true, "data": "data:image/png;base64,..." }
  ],
  "summary": { "total": 2, "succeeded": 2, "failed": 0, "totalMs": 85 }
}

Key Features

  • Defaults merging — Set shared params once, override per image
  • Parallel rendering — All images render concurrently via Promise.allSettled
  • Partial failure handling — One failed image doesn't kill the batch
  • Quota pre-check — Validates you have enough quota before rendering
  • Efficient billing — Only successful renders count toward usage

Full Changelog

  • POST /v1/og/batch — New batch generation endpoint
  • recordBatchUsage() — Single-query batch usage recording
  • Batch types: BatchRequest, BatchResult, BatchResponse

Try it live →

v0.5.0 — Custom Font URL Support

12 Feb 02:03

Choose a tag to compare

What's New

Custom Font URL Support

Use any TTF or OTF font by passing a URL — no upload needed.

# Use a custom font
curl "https://shotog.2214962083.workers.dev/v1/og?title=Hello&fontUrl=https://github.com/google/fonts/raw/main/ofl/poppins/Poppins-Bold.ttf"

# Works with Google Fonts, GitHub raw URLs, CDN links, etc.

How it works

  • Pass fontUrl parameter pointing to any .ttf or .otf file (max 5MB)
  • Font files are validated by magic bytes and cached for 1 hour
  • If the font URL fails, ShotOG gracefully falls back to the default Inter font
  • Check the X-Font-Fallback: true response header to detect fallback

Technical details

  • No R2/S3 storage needed — fonts are fetched on-demand and cached via Workers Cache API
  • 5-second fetch timeout prevents slow font servers from blocking image generation
  • Supports TTF (00 01 00 00) and OTF (4F 54 54 4F / "OTTO") formats

Full Changelog: v0.2.0...v0.5.0

v0.2.0 — 8 Templates, SDK & SEO Pages

12 Feb 01:14

Choose a tag to compare

What's New in v0.2.0

ShotOG is an edge-native OG image generation API powered by Cloudflare Workers. Generate beautiful Open Graph images with a single URL — no headless browser, no Puppeteer, no cold starts.

🎨 8 Production-Ready Templates

Template Best For
basic General pages, social sharing
blog Blog posts, articles
product SaaS products, launches
social Social media posts
event Events, webinars, conferences
changelog Release notes, changelogs
testimonial Customer quotes, reviews
announcement Launches, major updates

📦 TypeScript SDK

npm install shotog
import { ShotOG } from 'shotog'
const client = new ShotOG({ apiKey: 'your-key' })
const imageUrl = client.url({ template: 'blog', title: 'My Post' })

🔍 SEO Pages

  • /docs — API documentation
  • /pricing — Pricing tiers
  • /templates — Template gallery with live previews

⚡ Performance

  • 17ms startup — Cloudflare Workers edge runtime
  • ~50ms generation — Satori + resvg-wasm, no headless browser
  • Global CDN — Served from 300+ edge locations
  • 1568 KB bundle — Lightweight, fast cold starts

Quick Start

Generate an OG image right now — just open this URL:

https://shotog.2214962083.workers.dev/v1/og?template=blog&title=Hello%20World&subtitle=My%20First%20OG%20Image&author=You

Links


Full Changelog: https://github.com/nicepkg/shotog/commits/v0.2.0