Generate opengraph-image at build time for dynamic routes
Unanswered
Cinnamon posted this in #help-forum
CinnamonOP
Generating an image though the
In this case its a blog, posts get generated at build time via generateStaticParams(). Why do the open-graph images not get generated at build time as well?
Example opengraph-image.tsx:
opengraph-image.tsx
file convention for routes generated via generateStaticParams()
will result in only one lambda function being deployed, instead of being generated at build time. In this case its a blog, posts get generated at build time via generateStaticParams(). Why do the open-graph images not get generated at build time as well?
Example opengraph-image.tsx:
`ts
export const contentType = "image/png";
export const runtime = "nodejs";
export const dynamic = "force-static";
// Image generation
export default function Image({ params }: { params: { slug: string } }) {
...