Next.js Discord

Discord Forum

Open Graph image won't update after everything I've tried

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

I changed my opengraph-image.png, but in navigating to mysite.com/opengraph-image.png, it still is the old image, and sending it on social media still shows the old image as well. I've tried all of the following steps:
- Force redeploy
- Delete opengraph-image.png for an entire deployment, add it back, redeploy
- Add twitter-image.png (this is the correct, new image)
- Delete data cache

But no matter what I do, it still shows the old image. When I deleted it and created a new deployment, mysite.com/opengraph-image.png resulted in a 404, as expected. But when I added the NEW image and redeployed, mysite.com/opengraph-image.png took me to the OLD image. And localhost:3000/opengraph-image.png correctly shows the new image, so it has to be some weird cache behavior.

I haven't had the site scraped by google yet, and I've only sent the site (that would display the opengraph image) on discord and imessage. Does anyone have any advice? I'm begging, thank you!
Answered by joulev
ok so i just tried and could reproduce the behaviour. this is super weird, i think this is a bug on vercel's side.

BUT after redeploying without cache (uncheck this box in the screenshot), it works, so try that
View full answer

6 Replies

@joulev Clear your browser cache and visit the open graph image url again, does it work?
Nope it's still the old image, tried it on a fresh install of a browser as well
Also I was checking out glui a while ago its very cool :sunglasses_1:
@declspecl Nope it's still the old image, tried it on a fresh install of a browser as well
ok so i just tried and could reproduce the behaviour. this is super weird, i think this is a bug on vercel's side.

BUT after redeploying without cache (uncheck this box in the screenshot), it works, so try that
Answer
@joulev ok so i just tried and could reproduce the behaviour. this is super weird, i think this is a bug on vercel's side. BUT after redeploying without cache (uncheck this box in the screenshot), it works, so try that
Ahh that did work, awesome thank you 🙏 interestingly the og:image displayed in my deployment's "Open Graph" tab has a url parameter on the opengraph-image.png, and navigating to that link actually does take me to the old image. But luckily sending it on social media and navigating to just /opengraph-image.png shows the new one
Pretty interesting, thanks for all you help 😄