OG Image Generator
Design and render Open Graph / social card images offline: templates, live preview, code highlighting, batch.
Install
irm https://raw.githubusercontent.com/chayprabs/localtools/main/og-image-generator/install.ps1 | iexlocaltools-og-image-generator updatelocaltools-og-image-generator uninstall
curl -fsSL https://raw.githubusercontent.com/chayprabs/localtools/main/og-image-generator/install.sh | bashlocaltools-og-image-generator updatelocaltools-og-image-generator uninstall
brew install chayprabs/localtools/localtools-og-image-generatorbrew upgrade localtools-og-image-generatorbrew uninstall localtools-og-image-generator
scoop bucket add localtools https://github.com/chayprabs/homebrew-localtools; scoop install localtools-og-image-generatorscoop update localtools-og-image-generatorscoop uninstall localtools-og-image-generator
winget install localtools.OgImageGeneratorwinget upgrade localtools.OgImageGeneratorwinget uninstall localtools.OgImageGenerator
npm i -g localtools-og-image-generatornpm i -g localtools-og-image-generator@latestnpm rm -g localtools-og-image-generator
Opens at http://127.0.0.1:47128 in your browser. Run localtools-og-image-generator --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.
Direct download
| Platform | File | Size |
|---|---|---|
| Linux ARM64 | og-image-generator-1.0.3-linux-arm64.zip | 55.9 MB |
| Linux x64 | og-image-generator-1.0.3-linux-x64.zip | 55.6 MB |
| macOS Apple Silicon | og-image-generator-1.0.3-macos-arm64.zip | 45.6 MB |
| macOS Intel | og-image-generator-1.0.3-macos-x64.zip | 47.1 MB |
| Windows x64 | og-image-generator-1.0.3-windows-x64.zip | 58.4 MB |
SHA-256 checksums are in the release notes; the install scripts verify them for you.
See it
How to use
- Run localtools-og-image-generator; the page opens at http://127.0.0.1:47128.
- Pick a template (blog, docs, launch, repository, quote, code, event, minimal) and a size: OG 1200x630, X 1200x675, square, story or custom.
- Edit the fields, upload a logo, avatar, background image or your own font; the preview updates as you type.
- Download PNG, JPEG or SVG, or edit the HTML/CSS template in the Markup tab.
- For many cards: drop a CSV/JSON in the Batch tab, or run localtools-og-image-generator batch rows.csv --template blog -o cards/.
FAQ
Does it need a browser or the internet?
No. satori lays out the card and resvg rasterizes it inside the program; fonts, emoji and the code highlighter are embedded. Remote image URLs in templates are rejected and network access is switched off while rendering.
Can I use my own design?
Yes. The Markup tab (or --markup FILE) takes HTML with a <style> sheet and {{field}} placeholders, using satori's CSS subset: flex, grid, gradients, line-clamp, @media on the image size. Errors point to the line and column. The guide is MARKUP.md in this folder.
Which languages and emoji render?
Latin, Greek and Cyrillic with Geist, Inter or JetBrains Mono; Chinese, Japanese, Korean, Arabic, Hebrew and Devanagari fall back to bundled Noto fonts, and emoji use Twemoji. You can also upload .ttf, .otf, .woff or .woff2 fonts. Variable fonts are not supported; upload a static instance.
How many cards can a batch make?
Up to 1,000 rows per batch (500 cards take about 25 s). Columns are field names, a filename column names the files, and image columns refer to uploaded images (or files beside the CSV in the CLI).
What are the limits?
200-4096 px per side; images up to 10 MiB / 25 MP; four fonts up to 20 MiB each; raw markup up to 512 KiB / 5,000 elements. Expanded text is limited to 2 MiB, with uploaded image data resolved separately (128 MiB encoded references per card). The server allows 20 s per card / 15 minutes per batch and two active workers. The CLI runs until finished or interrupted.