
Image
Turn JSON layout specs into production OG images and social PNGs inside a TypeScript app using Satori via @json-render/image.
Overview
@json-render/image is an agent skill most often used in Build integrations (also Launch SEO and Grow content) that renders json-render JSON Specs to SVG and PNG images via Satori—including OG and social cards.
Install
npx skills add https://github.com/vercel-labs/json-render --skill imageWhat is this skill?
- renderToPng converts a json-render Spec into PNG (and SVG paths) through Satori
- Quick-start Spec with Frame, Heading, and typed element trees
- standardComponentDefinitions via defineCatalog for out-of-the-box layout primitives
- Custom components with zod props schemas merged into the image catalog
- Explicit triggers: OG images, social cards, and AI-generated image specs from JSON
Adoption & trust: 822 installs on skills.sh; 15k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have structured JSON describing a card or OG layout but no reliable server-side path to turn that spec into branded PNGs without bespoke canvas or HTML hacks.
Who is it for?
Solo builders shipping a TypeScript product who want programmatic OG/social images from JSON (including specs produced by agents) with a catalog-driven renderer.
Skip if: Teams that only need a one-off Figma export, have no JSON spec source, or want client-only canvas editing without @json-render/image and Satori font setup.
When should I use this skill?
Use when working with @json-render/image, generating OG images from JSON, creating social cards, or rendering AI-generated image specs.
What do I get? / Deliverables
After following the skill, you can define or extend an image catalog, pass font data to Satori, and export PNG/SVG from Spec roots for OG tags, social previews, or agent-generated layouts.
- PNG (and SVG) image bytes from a json-render Spec via renderToPng
- Image catalog definitions using defineCatalog, standard components, and optional custom zod components
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build because you install @json-render/image, define catalogs with zod, wire fonts, and call renderToPng in your codebase before anything ships. Integrations fits best: the skill documents library imports, Spec shape, standard vs custom component catalogs, and the render pipeline—not a one-off design tweak.
Where it fits
Wire renderToPng and font buffers into your API route so marketing pages can request images from stored Spec JSON.
Generate 1200×630 OG PNGs from a Frame + Heading Spec for every blog slug at build or request time.
Reuse the same catalog to render Twitter/LinkedIn card PNGs when you publish changelog posts.
Prototype branded share previews for a landing page before the full CMS exists by hardcoding a minimal Spec.
How it compares
Use this skill for catalog-based JSON-to-image rendering in your app—not for dropping static PNGs into a CMS or using a separate design-only OG screenshot SaaS.
Common Questions / FAQ
Who is image for?
Solo and indie builders using Claude Code, Cursor, or Codex on TypeScript apps who integrate @json-render/image for server-side graphics, OG metadata, or agent-output layouts.
When should I use image?
During Build when wiring the renderer and catalogs; at Launch when generating SEO Open Graph images from JSON; and during Grow when batching social share cards from the same Spec templates.
Is image safe to install?
Review the Security Audits panel on this Prism page for license, risk, and audit signals before adding vercel-labs/json-render to your agent or project workflow.
SKILL.md
READMESKILL.md - Image
# @json-render/image Image renderer that converts JSON specs into SVG and PNG images using Satori. ## Quick Start ```typescript import { renderToPng } from "@json-render/image/render"; import type { Spec } from "@json-render/core"; const spec: Spec = { root: "frame", elements: { frame: { type: "Frame", props: { width: 1200, height: 630, backgroundColor: "#1a1a2e" }, children: ["heading"], }, heading: { type: "Heading", props: { text: "Hello World", level: "h1", color: "#ffffff" }, children: [], }, }, }; const png = await renderToPng(spec, { fonts: [{ name: "Inter", data: fontData, weight: 400, style: "normal" }], }); ``` ## Using Standard Components ```typescript import { defineCatalog } from "@json-render/core"; import { schema, standardComponentDefinitions } from "@json-render/image"; export const imageCatalog = defineCatalog(schema, { components: standardComponentDefinitions, }); ``` ## Adding Custom Components ```typescript import { z } from "zod"; const catalog = defineCatalog(schema, { components: { ...standardComponentDefinitions, Badge: { props: z.object({ label: z.string(), color: z.string().nullable() }), slots: [], description: "A colored badge label", }, }, }); ``` ## Standard Components | Component | Category | Description | |-----------|----------|-------------| | `Frame` | Root | Root container. Defines width, height, background. Must be root. | | `Box` | Layout | Container with padding, margin, border, absolute positioning | | `Row` | Layout | Horizontal flex layout | | `Column` | Layout | Vertical flex layout | | `Heading` | Content | h1-h4 heading text | | `Text` | Content | Body text with full styling | | `Image` | Content | Image from URL | | `Divider` | Decorative | Horizontal line separator | | `Spacer` | Decorative | Empty vertical space | ## Key Exports | Export | Purpose | |--------|---------| | `renderToSvg` | Render spec to SVG string | | `renderToPng` | Render spec to PNG buffer (requires `@resvg/resvg-js`) | | `schema` | Image element schema | | `standardComponents` | Pre-built component registry | | `standardComponentDefinitions` | Catalog definitions for AI prompts | ## Sub-path Exports | Export | Description | |--------|-------------| | `@json-render/image` | Full package: schema, components, render functions | | `@json-render/image/server` | Schema and catalog definitions only (no React/Satori) | | `@json-render/image/catalog` | Standard component definitions and types | | `@json-render/image/render` | Render functions only |