Supersampling scale factor for higher-quality PNG output. Satori renders
the SVG at the original width × height; Resvg rasterises it at
width × scale pixels wide. Clamped to [1, 4]. Float values are
supported (1.5, 2, etc.).
import { createRenderer } from "@ogify/core";import basicTemplate from "@ogify/templates/basic";import type { TemplateParams } from "@ogify/templates/basic";const renderer = createRenderer<{ basic: TemplateParams }>({ templates: { basic: basicTemplate },});// Get template infoconst template = renderer.getTemplate("basic");console.log(template?.fonts);// Render imageconst buffer = await renderer.renderToImage("basic", { title: "My Page", subtitle: "A great description", layout: "centered",});// Save or return the bufferawait writeFile("og-image.png", buffer);