Next.js Discord

Discord Forum

Wrong URL in opengraph/twitter-image.tsx

Answered
Expensiveee posted this in #help-forum
Open in Discord
Avatar
Hello, when I generate a dynamic og/twitter image using the opengraph/twitter-image.tsx file and the ImageResponse method, the url put is not my "clean" domain but rather the depolyment url, so not example.com but dashboard-qnwp9tdl1.vercel.app
Answered by Expensiveee
Fixed by adding a metadatBase as the domain I want to use✅
View full answer

4 Replies

Avatar
Which can't work because when you access that url manually, it shows this:
Image
Avatar
Disabled some protection settings on Vercel for it to be able to work (which I don't like)
Any alternative pls?
Avatar
Fixed by adding a metadatBase as the domain I want to use✅
Answer