diff --git a/src/app/[locale]/opengraph-image.tsx b/src/app/[locale]/opengraph-image.tsx new file mode 100644 index 0000000..ae3b29b --- /dev/null +++ b/src/app/[locale]/opengraph-image.tsx @@ -0,0 +1,42 @@ +import { getTranslations } from "next-intl/server"; +import { ImageResponse } from "next/og"; +import { readFile } from "node:fs/promises"; +import { join } from "node:path"; + +export const alt = "Associació Catalana de l’Orgue"; +export const size = { width: 1200, height: 630 }; +export const contentType = "image/png"; + +export default async function Image({ + params, +}: { + params: Promise<{ locale: string }>; +}) { + const { locale } = await params; + const t = await getTranslations({ locale, namespace: "organization" }); + const fontSans = await readFile( + join(process.cwd(), "public/fonts/InterVariable.ttf"), + ); + + return new ImageResponse( + ( +