import { ImageResponse } from 'next/og'; import { getBook } from '@ebook/lib/book.server'; export const runtime = 'nodejs'; export const dynamic = 'force-dynamic'; export const alt = 'Read ebook'; export const size = { width: 1200, height: 630 }; export const contentType = 'image/png'; async function loadFont() { const res = await fetch( 'https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hiJ-Ek-_EeA.woff2' ); return { data: await res.arrayBuffer(), name: 'Inter' }; } export default async function ReadOgImage() { const book = getBook(); const font = await loadFont(); return new ImageResponse( (