Domo-OG effortlessly captures perfect Open Graph images without headless browsers. Cross-platform, ultra-lightweight, and lightning fast.
// Instant generation via Resvg import { generateOgImage } from "@zyrab/domo-og"; await generateOgImage({ slug: "my-post", title: "Hello World", template: { background: { type: "color", value: "#40C4FF" }, elements: [ { type: "text", content: "{{title}}", fontSize: 120, } ] }, });
Cross-platform compatibility out of the box. No OS-specific binary downloads or fragile native modules.
Define layouts, backgrounds, text, and images via simple JSON objects. No messing with raw SVG strings.
Prevents redundant generation with an internal manifest, drastically speeding up SSG builds.
Uses Resvg for lightning-fast rendering. No browser or DOM required.
Safely fetches and caches remote background images with built-in size limits to prevent memory issues.
See how simple JSON configs map to stunning OG cards.
* Note: Some elements (like image width/height and text maxLength) act differently in this sandbox preview.