Resize an Image for a GitHub Social Preview
GitHub's social preview (the card shown when a repo is shared) is 1280 × 640 px (2:1), minimum 640 × 320. Resize to that ratio so your preview looks sharp when linked on social — all in your browser.
The requirement
- Recommended size
- 1280 × 640 px
- Aspect ratio
- 2:1
- Minimum
- 640 × 320 px
- Format
- PNG, JPG or GIF (under 1 MB)
These are typical published values and can change from year to year and from one portal to another. Always confirm the exact requirement in the official notification or upload portal before you submit — the official source takes precedence over anything here.
Step by step
- 1Crop your image to a 2:1 aspect ratio.
- 2Resize it to 1280 × 640 px.
- 3Upload it under the repo's Settings → Social preview.
The free tools you need
Need something else? Try our free image resizer or crop an image online. You can also browse all free image tools — everything runs in your browser, with nothing uploaded.
Frequently asked questions
1280 × 640 px at a 2:1 ratio (minimum 640 × 320), under 1 MB.
In the repository Settings, under the Social preview section.
No — resizing runs in your browser.