OpenGraph image becomes my vercel project name
Answered
English Angora posted this in #help-forum
English AngoraOP
I have a silly issue with opengraph images.
I put down a opengraph image for og and twitter, but seems like the link in the head is wrong, it uses the vercel project name link:
https://example.vercel.app/opengraph-image.jpg
instead of
https://example.com/opengraph-image.jpg
and the image doesn't works since the route above (example.vercel.app) needs to be authed
I put down a opengraph image for og and twitter, but seems like the link in the head is wrong, it uses the vercel project name link:
https://example.vercel.app/opengraph-image.jpg
instead of
https://example.com/opengraph-image.jpg
and the image doesn't works since the route above (example.vercel.app) needs to be authed
Answered by Ray
try setting your domain in
it will use default value
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
metadataBase on metadatait will use default value
VERCEL_URL if you not set it.https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
2 Replies
@English Angora I have a silly issue with opengraph images.
I put down a opengraph image for og and twitter, but seems like the link in the head is wrong, it uses the vercel project name link:
https://example.vercel.app/opengraph-image.jpg
instead of
https://example.com/opengraph-image.jpg
and the image doesn't works since the route above (example.vercel.app) needs to be authed
try setting your domain in
it will use default value
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
metadataBase on metadatait will use default value
VERCEL_URL if you not set it.https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
Answer
English AngoraOP
It works now, thank you @Ray