Next.js Discord

Discord Forum

Error placing opengraph-image.tsx inside catch all

Unanswered
Gouty oak gall posted this in #help-forum
Open in Discord
Avatar
Gouty oak gallOP
I am using app directory.

I have a folder /app/recipe/[...ingredients]

In that folder I have page.tsx, when I add opengraph-image.tsx I get the following error:

unhandledRejection: Error: Catch-all must be the last part of the URL

But this seems to be how to handle different images for different slugs based on https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image

2 Replies

Avatar
Ray
there is an issue about this on github
https://github.com/vercel/next.js/issues/57349
Avatar
Gouty oak gallOP
Ouch, this invalidates how I was planning on doing this.