import { ImageResponse } from 'next/og'; import { getProductBySlug } from '@/lib/mdx'; export const runtime = 'nodejs'; export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string } }) { const productSlug = slug; const product = await getProductBySlug(productSlug, locale); if (!product) { return new ImageResponse(
); } return new ImageResponse( (