Forcefully update open graph images for X (Twitter)
For my Omarchy Hub project, I changed my open graph image but X/Twitter was still showing the old image for days. I changed the image filename, tried using Bitly short links, cleared all build cache, but nothing worked.
I followed the steps explained in this troubleshooting cards page, they recommended adding a random parameter, something like ?4362984378
, at the end of my open graph image URL, but it didn't work either.
<meta name="twitter:image" content="http://example.com/myimage.jpg?4362984378"></meta>
Then what worked?
I discovered that adding a random query parameter at the end of the URL, that you're going to share on X, works perfectly. X treats this as a new URL and re-fetches the card image. For example, you can add something like ?test=1
like below example, or whatever random query parameter you like. And then share this URL on X.
https://omarchy.deepakness.com/setups?test=1
But don't worry, adding the query parameter isn't going to break the URL or affect the content shown on the page. It's perfectly safe to use this.
- ← Previous
Claude brings web fetch tool to the API
Comment via email