GitHub social preview generator
A repository without a social preview shares as a grey box with an octocat in it. Setting one takes a minute and changes how the link reads everywhere it is posted.
The size
1280 × 640
- 1280 × 640 — exactly 2:1. Under 1 MB.
- Settings → General → Social preview, near the top of the page.
- Applies to the repository, not to individual files or releases.
Show the output, not the source
The instinct is to screenshot the code. Code at card size is a grey texture. What travels is the thing the code produces — the UI, the chart, the terminal session with recognisable output.
A terminal window makes a good subject here: high contrast, large type, and a shape people recognise instantly at small sizes.
2:1 is wider than it looks
At 1280 × 640 there is room for a full landscape screenshot with margin, unlike an X header. A gentle tilt and a dark background is usually all it needs — the card is small on screen and detail is wasted.
Dark backgrounds are worth defaulting to here. Repository links get posted into developer tools — Slack, Discord, terminals-adjacent places — where most people are in dark mode, and a white card is a flashbang in a dark channel.
One image, every repository
If you maintain several repositories, the preview is a chance to make them look like a family: the same background, the same angle, the same light, with only the screenshot changing.
That is a two-minute job here because a style is a complete scene rather than a set of sliders you have to match by eye. Apply the same one to each, swap the screenshot, export at 1280 × 640.
It also makes an abandoned-looking repository look maintained, which is not nothing when someone is deciding whether to depend on it.
Questions
- What size is a GitHub social preview?
- 1280 × 640, a 2:1 ratio, under 1 MB. Upload it in the repository's settings under Social preview.
- Why is the old image still showing?
- Link previews are cached by whoever is rendering them, not by GitHub. Re-fetch in that platform's debugger, or wait it out.
Make one at 1280 × 640
Drop a screenshot into the editor, pick a style, export. It runs on your own machine, so there is nothing to sign up for.
Open the editor