GitHub social preview generator

Make the image that shows up when your repository link is shared on X, LinkedIn, Slack or Discord. You get a 1280×640 PNG, the size GitHub recommends. Free, no signup.

The preview updates as you type. Free: 5 images/day.

How to set it on GitHub

  1. Download the PNG above. It's 1280×640 and well under GitHub's 1 MB limit.
  2. Open your repository → Settings → General → Social preview → Edit → Upload an image…
  3. Paste the repo URL into a post to check. Some platforms cache old previews for a while. Check any URL's tags with the Open Graph checker.

Generate previews for many repos or docs pages

Running an org with dozens of repos, or a docs site that needs a card per page? Build the card in HTML and render it with the API. A fixed-size body plus full_page gives an exact 1280×640 image.

curl -X POST https://shotmint.creasework.com/v1/screenshot -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"html": "<body style=\"margin:0;width:1280px;height:640px;background:#0d1117;color:#fff;font:700 72px sans-serif;display:flex;align-items:center;justify-content:center\">octocat/hello-world</body>", "width": 1280, "full_page": true}' -o preview.png

For standard 1200×630 page cards with no HTML at all, use /v1/og or the OG image generator. Every new image is 1 credit. €5 buys 2,000 with no subscription, and credits never expire. Get 100 free API renders

FAQ

What size should a GitHub social preview be? GitHub recommends at least 640×320 and suggests 1280×640 for the best display. Keep it under 1 MB (PNG, JPG or GIF).

Why doesn't my new image show up? X, Slack and LinkedIn cache link previews. Re-share after a while, or use the platform's own post inspector to refresh it.

Do I need an account? No. The card is built in your browser and rendered once on our server. We don't store your text.

Related: code to image for snippets in your README or launch post, website thumbnails for your project's site.