Is it possible to place a screenshot in README file in a GitHub repository? What’s the syntax?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use Markdown (README.md):
Provided that you have the image in your repo, you can use a relative URL:
If you need to embed an image that’s hosted elsewhere, you can use a full URL
GitHub recommend that you use relative links with the
?raw=trueparameter to ensure forked repos point correctly.The
raw=trueparameter is there in order to ensure the image you link to, will be rendered as is. That means that only the image will be linked to, not the whole GitHub interface for that respective file. See this comment for more details.Check out an example: https://raw.github.com/altercation/solarized/master/README.md
If you use SVGs then you’ll need to set the sanitize attribute to
trueas well:?raw=true&sanitize=true. (Thanks @EliSherer)Also, the documentation on relative links in README files: https://help.github.com/articles/relative-links-in-readmes
And of course the markdown docs: http://daringfireball.net/projects/markdown/syntax
Additionally, if you create a new branch
screenshotsto store the images you can avoid them being in themasterworking treeYou can then embed them using: