Resize & Crop

GitHub Social Preview size (1280x640)

Resize an image to 1280x640 for a GitHub repository social preview card. Free, runs 100% in your browser with no upload, shows crisp when links are shared.

Loading tool…

How to use GitHub Social Preview

  1. 1Upload the image you want to size for GitHub.
  2. 2Width and height are pre-filled to 1280×640px (2:1 aspect ratio).
  3. 3Adjust the dimensions if you like, then click Resize.
  4. 4Download your correctly sized image — nothing is uploaded.

Features

  • Use 1280x640 (2:1) so the card shows fully when your repo link is shared.
  • Keep the file under about 1MB, GitHub's social preview upload limit.
  • Make the project name large and legible with strong contrast for busy feeds.
  • Use consistent cards across repos so an organization's projects look cohesive.

The GitHub Social Preview size (1280×640px)

GitHub lets you set a social preview image on a repository, and it recommends 1280x640 pixels at a 2:1 ratio. This is the card that appears when someone shares your repo link on X, Slack, Discord, LinkedIn, or in a chat, so instead of a generic GitHub icon, your project gets a branded thumbnail with its name, logo, or a tagline, which noticeably improves click-through when your work is shared.

The 2:1 shape follows the open-graph card convention that most platforms use for link previews, and sizing to exactly 1280x640 ensures the image displays fully without those platforms cropping the top and bottom. GitHub notes an upper limit of around 1MB for the preview image, so a clean, optimized 1280x640 export that stays under that keeps the upload smooth while still looking sharp on high-resolution displays.

Because a preview card is scanned quickly in a busy feed or channel, keep it simple and legible: the repository or project name large, maybe a short tagline and a logo, with strong contrast and comfortable margins so nothing important sits where a platform might crop or overlay it. Consistent preview cards across your projects make an organization's repos feel like a coherent product family. Everything here resizes 100% in your browser with no upload and for free, so your image stays private on your device. GitHub can change its preview handling, so verify the current recommendation before setting it.

Frequently asked questions

What size is a GitHub social preview?

1280x640 pixels at a 2:1 ratio, the image shown when your repository link is shared on social platforms and chat apps.

Why set a social preview image?

It replaces the generic GitHub icon with a branded card showing your project's name and logo, improving click-through when links are shared.

Is there a file size limit?

GitHub caps the social preview around 1MB, so export a clean, optimized 1280x640 image that stays under that limit.

Is this resizer free and private?

Yes. It runs 100% in your browser with no upload, and it is free. GitHub's preview handling can change, so verify before setting it.

Related tools