You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -102,20 +102,32 @@ You can create an inline link by wrapping link text in brackets `[ ]`, and then
102
102
## Images
103
103
104
104
You can display an image starting by adding `!` and wrapping the alt text in`[ ]`. Then wrap the location of the image in parentheses `()`.
105
+
105
106
``
{% 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)."
108
113
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 %}
110
122
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.
112
124
113
125
| Context | Relative Link |
114
126
| ------ | -------- |
115
127
| In a `.md` file on the same branch |`/assets/images/electrocat.png`|
116
128
| 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`|
119
131
For more information see "[Relative Links](#relative-links)."
0 commit comments