-
Summaryopengraph-image file's url always start with localhost:3000 after nextjs build, I can not find how to set it's host, need help! Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @jkiss , Did you set the basePath in next.config.js?
In your code where you set the OpenGraph image URL, use the base URL you defined in next.config.js as the prefix for the image path. For example:
|
Beta Was this translation helpful? Give feedback.
-
there is a |
Beta Was this translation helpful? Give feedback.
-
As reference this is the link to the solution https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase |
Beta Was this translation helpful? Give feedback.
there is a
metadataBase
option, but it only works build&start that very confusing me 🤣