Using NextJS v14.1.4
Tried purging the Data Cache.
OpenGraph image not updating during deployment.
The OpenGraph image is found in /app/opengraph-image.png
Using NextJS v14.1.4
Tried purging the Data Cache.
OpenGraph image not updating during deployment.
The OpenGraph image is found in /app/opengraph-image.png
Hi, Can you try switching to .jpg
format and see if it works?
Why doesn’t Vercel update the images?
Why do we need to change the format?
Hey @khesualdo I think .jpg might be a better option since JPG files are typically smaller than PNG files for photographic images. This can sometimes help bypass certain caching mechanisms.
Also, changing the file extension also changes the Content-Type header, which might trigger Vercel to recognize it as a new file.
As for why Vercel doesn’t always update images immediately, a potential cause might be caching. Vercel uses aggressive caching strategies to improve performance. If the image is part of the build output, Vercel might be using a cached version from a previous build if it doesn’t detect changes in your code.
To resolve this issue, you can:
opengraph-image.png?v=2
).Let me know if this helps?
Hey @joeyouss @swarnava , still having problems…
Updating to .jpg
generates metatags with the new images, but Facebook and LinkedIn still use the old images for some reason.
Using a versioned file name ie. opengraph-image.png?v=2
did not generate metatags at all.
How do I manually purge the Vercel CDN cache for a specific asset?
If I go to the latest deployment, then Deployment Summary, then under Functions I see /opengraph-image.png
and /twitter-image.png
does that mean they are included during the build process?
Hi,
Yes it should be included in your deployment. Social media site also cache sometime which I have seen often. What is the full URL of the image where you are experiencing issue?
https://quickmaffs.com/opengraph-image.png?9a348dfc0f796b64
https://quickmaffs.com/twitter-image.png?9a348dfc0f796b64
I cannot reproduce this unfortunately:
I get the exact image when I try to access https://quickmaffs.com/opengraph-image.png?9a348dfc0f796b64. Is there a specific link where you are reproducing this?
What are you trying to reproduce?
The images do show up, but they are outdated images.
The image you provided is outdated, there is supposed to be a new/different image.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.