Open pwnllc opened 1 year ago
Same problem here. Any solution so far?
I have solved this by moving the og API from app/api/og/route.ts to pages/api/og.ts. This seemed the easiest and most stable solution to me
Is there any other solutions so far?
I have solved this by moving the og API from app/api/og/route.ts to pages/api/og.ts. This seemed the easiest and most stable solution to me
This worked for me after cracking my head around for days. There isn't any solution around on why Next 14 does not support ImageResponse as a response in an api route under the app router.
I also tried the opengraph-image.tsx method but there isn't any way to pass in any parameters other than only using those from the url. https://nextjs.org/docs/app/building-your-application/optimizing/metadata#dynamic-image-generation
Change the import to:
import { ImageResponse } from "next/og"
Hello! When I try to build this on my RPi, the following error occurs: