@vercel/og but it works with Node.js
The API is compatible with @vercel/og.
The package exposes an ImageResponse constructor, with the following options available:
importtype{ReactElement}from"react";import{ImageResponse}from"@vercel/og";newImageResponse(element: ReactElement,options: {width?: number=1200height?: number=630emoji?: "twemoji"|"blobmoji"|"noto"|"openmoji"|"fluent"|"fluentFlat"="twemoji",fonts?: {name: string,data: ArrayBuffer,weight: number,style: "normal"|"italic"}[]debug?: boolean=false// Options that will be passed to the HTTP responsestatus?: number=200statusText?: string
headers?: Record<string,string>},);When running in production, these headers will be included:
"content-type": "image/png","cache-control": "public, immutable, no-transform, max-age=31536000",During development, the cache-control: no-cache, no-store header is used instead.
This project will not be possible without the following projects: