How to share a screenshot in GitHub
Take the screenshot with your system shortcut, then paste it into a GitHub issue, pull request or comment box with Ctrl+V (Cmd+V on Mac), or drag the file in. GitHub uploads it and inserts the image for you.
Screenshots make bug reports and pull requests much easier to understand. GitHub accepts images in its comment boxes, so you do not need any extra tool to get started.
Take the screenshot
Use the shortcut that comes with your system:
- Windows: Win+Shift+S to select an area, which copies it to the clipboard.
- Mac: Cmd+Shift+4 for an area, or add Ctrl to copy it to the clipboard instead of saving a file.
- Linux: Print Screen on most desktops, or your desktop's screenshot tool.
Add it to an issue or pull request
Open the issue, pull request or comment box, click into it and press Ctrl+V (Cmd+V on Mac). You can also drag an image file into the box or use the attach option under the editor. GitHub adds a Markdown image line to your text. Use the Preview tab to check how it looks before you post.
A few habits make screenshots more useful:
- Crop to the part that matters instead of the whole screen.
- Add an arrow or box on the problem area.
- Write the steps to reproduce in text as well, so the issue can still be searched.
- For error messages, paste the text in a code block and use the screenshot as extra context.
On a phone
On an iPhone, press the side button and volume up together. On most Android phones, press power and volume down. Then open the issue in the GitHub mobile app or in your phone browser and attach the image from your gallery. Button names in the app can change between versions.
When screenshots are blocked
Some apps do not allow screen capture. Streaming services with copy protection can show a black image, and some banking apps and secure messengers block it on purpose. Snapchat notifies the sender. Those are deliberate protections, so do not try to bypass them.
Think before you post publicly
Issues in a public repository can be read by anyone, and images in them may stay reachable even if you later edit the comment. Check every screenshot for API keys, tokens, email addresses, internal URLs, customer data and file paths with usernames. Pixelate or blur them before you upload. A blur is safer than a coloured box if the editor keeps the original layer.
If you would rather keep the image outside the repository, ShotBox is a free web tool that gives you a long random private link, not listed and not indexed. Links can expire after 1 hour, 1 day, 7 days or 30 days, or be deleted at any time, and camera and GPS data are removed. It also gives you ready embed codes in Markdown, HTML and BBCode, so you can paste the Markdown straight into a GitHub comment.
Frequently asked questions
Can I paste a screenshot directly into a GitHub issue?
Yes. Copy the screenshot, click into the issue or comment box and press Ctrl+V (Cmd+V on Mac). GitHub uploads it and adds an image line for you.
How do I add a screenshot to a pull request from my phone?
Take the screenshot with your phone buttons, open the pull request in the GitHub app or browser, and attach the image from your gallery to a comment.
Is it safe to post screenshots in a public repository?
Only if you have checked them. Anyone can see images in public issues, so blur or pixelate tokens, emails, internal links and personal data first.
Can I use a Markdown image link from another site in GitHub?
Yes. Upload the image to a tool like ShotBox and paste its Markdown embed code into your comment. Remember that if the link expires or is deleted, the image will stop showing.
Why can't I take a screenshot of some apps?
Some apps, such as streaming services and certain banking or secure messaging apps, block capture on purpose. This is a protection, so respect it and share the information another way.