UNPKG

og-img

Version:

Generate dynamic Open Graph images for your website

34 lines (30 loc) 828 B
export { html } from 'satori-html'; import { ReactNode } from 'react'; import { SatoriOptions } from 'satori'; /** * Fetches a font from a URL. * * @param url The URL of the font. * * @returns The font data. */ declare function fetchFont(url: URL | string): Promise<ArrayBuffer>; type ImageContent = ReactNode; type ImageOptions = SatoriOptions & { headers?: HeadersInit; status?: number; statusText?: string; }; /** * Image response to render Open Graph images. */ declare class ImageResponse extends Response { /** * Creates an image response instance. * * @param content Content to render. * @param options Configuration options. */ constructor(content: ImageContent, options: ImageOptions); } export { type ImageContent, type ImageOptions, ImageResponse, fetchFont };