Skip to content

Commit 66b7b97

Browse files
committed
✏️
1 parent af26036 commit 66b7b97

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,32 @@ You can create an inline link by wrapping link text in brackets `[ ]`, and then
102102
## Images
103103

104104
You can display an image starting by adding `!` and wrapping the alt text in`[ ]`. Then wrap the location of the image in parentheses `()`.
105+
105106
`![This is an image](https://myoctocat.com/assets/images/base-octocat.svg)`
106-
![Rendered Image](/assets/images/help/writing/image-rendered.png)
107+
108+
![Rendered Image](https://raw.githubusercontent.com/github/docs/main/assets/images/electrocat.png)
109+
110+
![Image by the user]()
111+
107112
{% data variables.product.product_name %} supports embedding images into your issues, pull requests{% ifversion fpt %}, discussions{% endif %}, comments and `.md` files. You can either add an image to your repository, add a link to an image or upload an image. For more information, see "[Uploading assets](#uploading-assets)."
108113

109-
**Tip:** When you want to link a image which is in your repository, it is recommended that you use relative links instead of absolute links. When linking an image from a different repository, go to the page with the image and click on `download` to get the `raw` link of the image. You can use this link to display the image.
114+
{% tip %}
115+
116+
**Tip:** When you want to link a image which is in your repository, it is recommended that you use relative links instead of absolute links.
117+
118+
When linking an image from a different repository,
119+
obtain raw link of the image from **Download** page of the image.
120+
121+
{% endtip %}
110122

111-
Example : If you want to use an image that is in the docs repository, you can use the relative link to display the image in a `.md` file in the same repository. For linking an image in an issue, pull request, comments, use the raw link obtained from **Download** on the image page. You can use the similar method from linking an image in an `.md` file from a different repository.
123+
Example : If you want to use an image that is in the docs repository, you can use the relative link to display the image in a `.md` file in the same repository. If you want to link an image in an issue, pull request or a comment, use the raw link obtained from **Download** on the image page. You can use the same method for linking an image in an `.md` file from a different repository.
112124

113125
| Context | Relative Link |
114126
| ------ | -------- |
115127
| In a `.md` file on the same branch | `/assets/images/electrocat.png` |
116128
| In a `.md` file on another branch | `/../docs/assets/images/electrocat.png` |
117-
| In Issues,Pull Requests & comments of the repository | `/../docs/assets/images/electrocat.png?raw=true` |
118-
| In a `.md` file on another repo | `https://raw.githubusercontent.com/github/docs/main/assets/images/electrocat.png` |
129+
| In Issues,Pull Requests & comments of the repository | `(https://raw.githubusercontent.com/github/docs/main/assets/images/electrocat.png)` |
130+
| In `.md` file on another repository | `https://raw.githubusercontent.com/github/docs/main/assets/images/electrocat.png` |
119131
For more information see "[Relative Links](#relative-links)."
120132

121133
## Lists

0 commit comments

Comments
 (0)