Compress Images Before Adding to GitHub README
Overview
Images committed to a GitHub repository are stored permanently in git history. Uncompressed screenshots (2-5MB) bloat the repository and slow down clones. Compress to under 500KB per image before committing. GitHub renders images up to 1280px wide in README files.
How to Use This Tool
Upload your screenshot or diagram. Set width to 1280px and quality to 85% for photos, or keep PNG format for diagrams with text. Click Compress. Commit the compressed image to your repo.
Ready to get started? It's free, no registration required, and your files never leave your device.
PDF Tool →Frequently Asked Questions
What is the best format for GitHub README images?
PNG for screenshots and diagrams with text (lossless, sharp edges). JPG for photos. SVG for icons and vector graphics (smallest file, infinite scaling). Avoid GIFs for static images as they are often 5-10x larger than PNG.
Can I store images outside my GitHub repo to save space?
Yes. GitHub recommends using GitHub's CDN by dragging images into issue comments, then copying the URL into your README. This stores images on GitHub's CDN without adding them to the repository.
Is there a file size limit for images in GitHub repos?
GitHub warns at 50MB per file and blocks files above 100MB. Repositories over 1GB receive a warning. There is no per-image limit but compressing images keeps clone times fast.