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( (
{/* Rolling hills along the bottom edge — the illustration style, reduced to the one gesture that survives at thumbnail size. */}
{/* Lockup */}
{/* eslint-disable-next-line @next/next/no-img-element */}
school compare
{/* Proposition. Sized so the headline holds two lines and the subhead one — an orphaned word reads as an accident at this size. */}
Find the school where your child will flourish.
24,000+ schools in England · SATs, GCSEs, Ofsted and admissions
), { ...size, fonts: [ { name: 'Manrope', data: regular, weight: 400, style: 'normal' }, { name: 'Manrope', data: bold, weight: 700, style: 'normal' }, ], } ); }