Image preview not showing
Answered
Scottish Fold posted this in #help-forum
Scottish FoldOP
So, I am working for a club website, trying to make the image preview but it is not loading the preview. How to fix it?
Answered by alfonsüs ardani
try changing it to
const siteUrl = process.env.NODE_ENV === "development"
? `http://localhost:3000/`
: 'https://bookworms-of-hstu.vercel.app/';
24 Replies
Scottish FoldOP
This is my code
@Scottish Fold So, I am working for a club website, trying to make the image preview but it is not loading the preview. How to fix it?
how do you know that image preview is not loading the preview?
@alfonsüs ardani how do you know that image preview is not loading the preview?
Scottish FoldOP
So, I put the link both in facebook and discord just to check this. Turns out that the preview image doesn't show up
can we see the link to troubleshoot?
Scottish FoldOP
see? nothing
this is weird because it shouldve used the correct link
const siteUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: 'http://localhost:3000';
im not sure why its using the branch deployment link instead of the production link
@alfonsüs ardani its because of this link
https://bookworms-of-hstu-ozwuqyt2q-prince-khans-projects-87138778.vercel.app/og-image.jpg
Scottish FoldOP
How to solve this then?
@Scottish Fold How to solve this then?
try changing it to
const siteUrl = process.env.NODE_ENV === "development"
? `http://localhost:3000/`
: 'https://bookworms-of-hstu.vercel.app/';
Answer
Scottish FoldOP
made a change but still it is not doing as expected
thats so weird...
it works @Scottish Fold , its just those platform caches previous result
Scottish FoldOP
just need to wait few hours for the cache to refresh
add different queries everytime you change the og
like ?123 or ?abc
if u wanna see quickly