tag:github.com,2008:https://github.com/nicepkg/shotog/releases
Release notes from shotog
2026-02-12T02:18:04Z
tag:github.com,2008:Repository/1155843689/v0.6.0
2026-02-12T02:18:26Z
v0.6.0 — Batch Generation API
<h2>What's New</h2>
<h3>Batch OG Image Generation (<code>POST /v1/og/batch</code>)</h3>
<p>Generate up to <strong>20 OG images in a single API call</strong>. Perfect for:</p>
<ul>
<li>Static site generators that need OG images for every page</li>
<li>CMS systems generating images for all blog posts</li>
<li>CI/CD pipelines creating images at build time</li>
</ul>
<h4>Request</h4>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"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"
}
}"><pre>{
<span class="pl-ent">"images"</span>: [
{ <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>hero<span class="pl-pds">"</span></span>, <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>My Product<span class="pl-pds">"</span></span>, <span class="pl-ent">"template"</span>: <span class="pl-s"><span class="pl-pds">"</span>product<span class="pl-pds">"</span></span> },
{ <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>blog-1<span class="pl-pds">"</span></span>, <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>How to X<span class="pl-pds">"</span></span>, <span class="pl-ent">"template"</span>: <span class="pl-s"><span class="pl-pds">"</span>blog<span class="pl-pds">"</span></span>, <span class="pl-ent">"author"</span>: <span class="pl-s"><span class="pl-pds">"</span>Alice<span class="pl-pds">"</span></span> }
],
<span class="pl-ent">"defaults"</span>: {
<span class="pl-ent">"format"</span>: <span class="pl-s"><span class="pl-pds">"</span>png<span class="pl-pds">"</span></span>,
<span class="pl-ent">"width"</span>: <span class="pl-c1">1200</span>,
<span class="pl-ent">"height"</span>: <span class="pl-c1">630</span>,
<span class="pl-ent">"domain"</span>: <span class="pl-s"><span class="pl-pds">"</span>example.com<span class="pl-pds">"</span></span>
}
}</pre></div>
<h4>Response</h4>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"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 }
}"><pre>{
<span class="pl-ent">"results"</span>: [
{ <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>hero<span class="pl-pds">"</span></span>, <span class="pl-ent">"success"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"data"</span>: <span class="pl-s"><span class="pl-pds">"</span>data:image/png;base64,...<span class="pl-pds">"</span></span> },
{ <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>blog-1<span class="pl-pds">"</span></span>, <span class="pl-ent">"success"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"data"</span>: <span class="pl-s"><span class="pl-pds">"</span>data:image/png;base64,...<span class="pl-pds">"</span></span> }
],
<span class="pl-ent">"summary"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"succeeded"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"failed"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"totalMs"</span>: <span class="pl-c1">85</span> }
}</pre></div>
<h3>Key Features</h3>
<ul>
<li><strong>Defaults merging</strong> — Set shared params once, override per image</li>
<li><strong>Parallel rendering</strong> — All images render concurrently via <code>Promise.allSettled</code></li>
<li><strong>Partial failure handling</strong> — One failed image doesn't kill the batch</li>
<li><strong>Quota pre-check</strong> — Validates you have enough quota before rendering</li>
<li><strong>Efficient billing</strong> — Only successful renders count toward usage</li>
</ul>
<h3>Full Changelog</h3>
<ul>
<li><code>POST /v1/og/batch</code> — New batch generation endpoint</li>
<li><code>recordBatchUsage()</code> — Single-query batch usage recording</li>
<li>Batch types: <code>BatchRequest</code>, <code>BatchResult</code>, <code>BatchResponse</code></li>
</ul>
<p><strong><a href="https://shotog.2214962083.workers.dev" rel="nofollow">Try it live →</a></strong></p>
2214962083
tag:github.com,2008:Repository/1155843689/v0.5.0
2026-02-12T02:03:01Z
v0.5.0 — Custom Font URL Support
<h2>What's New</h2>
<h3>Custom Font URL Support</h3>
<p>Use any TTF or OTF font by passing a URL — no upload needed.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# 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."><pre><span class="pl-c"><span class="pl-c">#</span> Use a custom font</span>
curl <span class="pl-s"><span class="pl-pds">"</span>https://shotog.2214962083.workers.dev/v1/og?title=Hello&fontUrl=https://github.com/google/fonts/raw/main/ofl/poppins/Poppins-Bold.ttf<span class="pl-pds">"</span></span>
<span class="pl-c"><span class="pl-c">#</span> Works with Google Fonts, GitHub raw URLs, CDN links, etc.</span></pre></div>
<h3>How it works</h3>
<ul>
<li>Pass <code>fontUrl</code> parameter pointing to any <code>.ttf</code> or <code>.otf</code> file (max 5MB)</li>
<li>Font files are validated by magic bytes and cached for 1 hour</li>
<li>If the font URL fails, ShotOG gracefully falls back to the default Inter font</li>
<li>Check the <code>X-Font-Fallback: true</code> response header to detect fallback</li>
</ul>
<h3>Technical details</h3>
<ul>
<li>No R2/S3 storage needed — fonts are fetched on-demand and cached via Workers Cache API</li>
<li>5-second fetch timeout prevents slow font servers from blocking image generation</li>
<li>Supports TTF (<code>00 01 00 00</code>) and OTF (<code>4F 54 54 4F</code> / "OTTO") formats</li>
</ul>
<hr>
<p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/nicepkg/shotog/compare/v0.2.0...v0.5.0"><tt>v0.2.0...v0.5.0</tt></a></p>
2214962083
tag:github.com,2008:Repository/1155843689/v0.2.0
2026-02-12T01:14:55Z
v0.2.0 — 8 Templates, SDK & SEO Pages
<h2>What's New in v0.2.0</h2>
<p>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.</p>
<h3>🎨 8 Production-Ready Templates</h3>
<table>
<thead>
<tr>
<th>Template</th>
<th>Best For</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>basic</code></td>
<td>General pages, social sharing</td>
</tr>
<tr>
<td><code>blog</code></td>
<td>Blog posts, articles</td>
</tr>
<tr>
<td><code>product</code></td>
<td>SaaS products, launches</td>
</tr>
<tr>
<td><code>social</code></td>
<td>Social media posts</td>
</tr>
<tr>
<td><code>event</code></td>
<td>Events, webinars, conferences</td>
</tr>
<tr>
<td><code>changelog</code></td>
<td>Release notes, changelogs</td>
</tr>
<tr>
<td><code>testimonial</code></td>
<td>Customer quotes, reviews</td>
</tr>
<tr>
<td><code>announcement</code></td>
<td>Launches, major updates</td>
</tr>
</tbody>
</table>
<h3>📦 TypeScript SDK</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install shotog"><pre>npm install shotog</pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { ShotOG } from 'shotog'
const client = new ShotOG({ apiKey: 'your-key' })
const imageUrl = client.url({ template: 'blog', title: 'My Post' })"><pre><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">ShotOG</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'shotog'</span>
<span class="pl-k">const</span> <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">ShotOG</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">apiKey</span>: <span class="pl-s">'your-key'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">imageUrl</span> <span class="pl-c1">=</span> <span class="pl-s1">client</span><span class="pl-kos">.</span><span class="pl-en">url</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">template</span>: <span class="pl-s">'blog'</span><span class="pl-kos">,</span> <span class="pl-c1">title</span>: <span class="pl-s">'My Post'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<h3>🔍 SEO Pages</h3>
<ul>
<li><code>/docs</code> — API documentation</li>
<li><code>/pricing</code> — Pricing tiers</li>
<li><code>/templates</code> — Template gallery with live previews</li>
</ul>
<h3>⚡ Performance</h3>
<ul>
<li><strong>17ms startup</strong> — Cloudflare Workers edge runtime</li>
<li><strong>~50ms generation</strong> — Satori + resvg-wasm, no headless browser</li>
<li><strong>Global CDN</strong> — Served from 300+ edge locations</li>
<li><strong>1568 KB bundle</strong> — Lightweight, fast cold starts</li>
</ul>
<h3>Quick Start</h3>
<p>Generate an OG image right now — just open this URL:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="https://shotog.2214962083.workers.dev/v1/og?template=blog&title=Hello%20World&subtitle=My%20First%20OG%20Image&author=You"><pre class="notranslate"><code>https://shotog.2214962083.workers.dev/v1/og?template=blog&title=Hello%20World&subtitle=My%20First%20OG%20Image&author=You
</code></pre></div>
<h3>Links</h3>
<ul>
<li>🌐 <strong>Live API</strong>: <a href="https://shotog.2214962083.workers.dev" rel="nofollow">https://shotog.2214962083.workers.dev</a></li>
<li>📖 <strong>Docs</strong>: <a href="https://shotog.2214962083.workers.dev/docs" rel="nofollow">https://shotog.2214962083.workers.dev/docs</a></li>
<li>🎨 <strong>Templates</strong>: <a href="https://shotog.2214962083.workers.dev/templates" rel="nofollow">https://shotog.2214962083.workers.dev/templates</a></li>
</ul>
<hr>
<p><strong>Full Changelog</strong>: <a href="https://github.com/nicepkg/shotog/commits/v0.2.0">https://github.com/nicepkg/shotog/commits/v0.2.0</a></p>
2214962083