Next.js Discord

Discord Forum

Social Sharing Image

Answered
alexmurray posted this in #help-forum
Open in Discord
Hi all

I've got an image coming through to my website from an API that I'm wanting to use as in the og:image tag. I'm using fetch() to get the image but I think what's happening is the page is loading before the image is fetched. I'm using a chrome plugin and can see that the image is set correctly, however the Facebook Sharing Debugger tool is not showing an image, this is also happening for the og:description.

Does anyone know of a solution to fix this?
TIA.
Answered by alexmurray
Answered my own question - used getServerSideProps worked.
View full answer

1 Reply

Answered my own question - used getServerSideProps worked.
Answer