import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; import { ImageResponse } from 'next/og'; import { markDataUri } from '@/components/Logo'; /** * The site had no og:image at all, so every link pasted into a class WhatsApp * group or a Slack channel rendered as a bare grey text card — on the highest * intent channel this product has. * * The card is the brand's own proposition on the Sand ground, with the mark * and a suggestion of the illustration's rolling landscape along the bottom. * It states the promise rather than decorating it. */ export const alt = 'schoolcompare — find the school where your child will flourish'; export const size = { width: 1200, height: 630 }; export const contentType = 'image/png'; const SAND = '#F5EFE6'; const INK = '#1C2731'; const MUTED = '#5F6A75'; const TEAL = '#0F766E'; const SAGE = '#A7D7C5'; const SAGE_DEEP = '#7FC3AC'; const SAGE_PALE = '#D6EDE2'; async function font(file: string) { return readFile(join(process.cwd(), 'assets', file)); } export default async function OpengraphImage() { const [regular, bold] = await Promise.all([ font('Manrope-Regular.ttf'), font('Manrope-Bold.ttf'), ]); return new ImageResponse( (