GitHub social preview image not showing or not updating
GitHub serves Open Graph tags for every public repository. Upload a Social preview image under the repo Settings, or GitHub falls back to a generated card with your avatar. After you change the image, refresh each app's cache because platforms keep the old card.
Last updated
Quick fix
Open the repository Settings page and scroll to Social preview.
Upload a PNG, JPG or GIF under 1 MB, ideally 1280 x 640 px.
Check the repo URL with the meta tag checker and confirm og:image points at your upload.
Refresh LinkedIn, X or Slack with their tools, or share with ?v=2.
Why the GitHub social preview is wrong or missing
No custom image is set. GitHub then shows a generated card with the owner avatar, repo name and basic stats.
The repository is private. Custom social previews only share from public repositories.
The image failed the size rules. GitHub wants PNG, JPG or GIF under 1 MB, at least 640 x 320 px.
The app cached an earlier card. GitHub updates og:image right away, but LinkedIn, X and Slack keep their own cache.
You shared a commit, PR or issue URL. Those pages use GitHub’s generated card, not the repository Social preview.

How to fix it
Open the repository on GitHub and go to Settings.
Under Social preview, click Edit, then Upload an image.
Use a PNG, JPG or GIF under 1 MB. GitHub recommends at least 640 x 320 px, and 1280 x 640 px for best display.
Check the repository URL with the meta tag checker and confirm
og:imagepoints at repository-images.githubusercontent.com or opengraph.githubassets.com.Refresh each app’s cache before you share the link again.

Tags GitHub writes
og:titlefor the repository nameog:descriptionfrom the About descriptionog:imagefor the Social preview or the generated cardtwitter:cardas summary_large_image

GitHub writes these tags for you. You do not edit the HTML of github.com pages.
Image size rules
PNG, JPG or GIF under 1 MB
At least 640 x 320 px
1280 x 640 px recommended
PNG transparency is supported; a solid background is safer across dark modes
Check the file with the OG image size checker.
How to force a refresh
GitHub has no share debugger of its own. After the Social preview is live on the repo page, use LinkedIn’s Post Inspector, Meta’s Sharing Debugger, or share with ?v=2 on X and chat apps. The refresh tool has the step for every app.
Sources
FAQ
How do I set a GitHub social preview image?
Open the repository Settings page, scroll to Social preview, click Edit and upload a PNG, JPG or GIF under 1 MB.
Why does my GitHub link still show the old image?
GitHub updates og:image immediately. LinkedIn, X and Slack cache the old card, so refresh those tools or share with ?v=2.
Does a pull request use my Social preview image?
No. Commit, pull request, issue and release pages use GitHub’s generated card. Only the main repository URL uses your custom Social preview.
Check your page, then refresh the preview
Paste your URL into the free checker to see the exact tags each app reads. Once the tags are right, use the refresh tool to clear the old preview.
Related guides
X (Twitter) card not showing or not updating
X builds the card from twitter: tags, falling back to og: tags. There is no longer a validator that refreshes the cache, so the fix is good tags plus a fresh URL.
Slack link preview not working or not updating
Slack unfurls links with a bot that reads oEmbed, Open Graph and Twitter Card tags. Results are cached across Slack for about 30 minutes.
Discord embed not showing or not updating
Discord fetches the page once, reads the tags in the server HTML and caches the embed for about 30 minutes. It never runs your JavaScript.