sanity-next-social-image-generator
Version:
Generate social images in Next.js with Sanity webhooks
29 lines (28 loc) • 717 B
TypeScript
/// <reference types="node" />
import { FitEnum } from 'sharp';
export declare type Fits = keyof FitEnum;
export interface GenerateOptions {
id: string;
backgroundImageUrl: string;
text?: string;
width?: number;
height?: number;
backgroundFit?: Fits;
fontColor?: string;
fontSize?: number;
fontName?: string;
blur?: number;
darken?: number;
lighten?: number;
logo?: string | Buffer;
logoPosition?: 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft';
logoWidth?: number;
logoHeight?: number;
logoFit?: Fits;
filterColor?: string;
dataset: string;
projectId: string;
apiVersion: string;
useCdn: boolean;
redisUrl: string;
}