import { readFile } from "node:fs/promises"; import { join } from "node:path"; import { ImageResponse } from "next/og"; import { BRAND_HEX, SITE_NAME } from "@/lib/seo"; /** * The default social card for every route that does not define its own. * Rendered at build/request time by Satori — no binary asset to keep in sync. */ export const alt = `${SITE_NAME} — from a topic idea to a finished podcast in minutes`; export const size = { width: 1200, height: 630 }; export const contentType = "image/png"; /** * The real brand mark, inlined as a data URI. Satori cannot fetch a relative URL * (there is no origin while rendering), so the PNG is read off disk and embedded. */ async function brandMarkDataUri() { const file = await readFile(join(process.cwd(), "app", "icon.png")); return `data:image/png;base64,${file.toString("base64")}`; } export default async function OpengraphImage() { const mark = await brandMarkDataUri(); return new ImageResponse( (