44

The title says it all. I took a look into GitLab docs but couldn't find clear-cut solution to this.

How do I add image to readme on GitLab ? Image that's within the repo.

3

6 Answers 6

31

You can use ![image info](images/image.png) where images could be a directory in your project structure.

Sign up to request clarification or add additional context in comments.

Comments

18

Use ![IMAGE_DESCRIPTION](url_of_image)

Comments

8

From the docs

Inline-style (hover to see title text):

![alt text](img/markdown_logo.png "Title Text")

Reference-style (hover to see title text):

![alt text1][logo]

[logo]: img/markdown_logo.png "Title Text"

2 Comments

Ohh .. OK. I didn't bump into this page. Thanks a bunch.
That works in Issues, not in README.md, at least not for an image in the repository, as OP asked.
2
  1. Add image to your project folder(either root level or in subfolder such as images/)
  2. Now, In your readme.md file, Use the syntax ![Alt text for the image](relative/path/to/image.png)
  3. Replace the relative path and image name e.g., ![Demo Image](images/demo.png)
  4. Now Push your changes. You should see the image in your readme.md file

Comments

0

for more info. create issue and upload image /copy url of image to IMAGE_DESCRIPTION

Comments

0

BEST AND EASIEST WAY:

Use HTML element like this:

<img src="https://github.com/user/repo/blob/main/output.jpg" 
     align="center" height="350" width="600"/>

This will allow to control Height/Width/Alignment too.

1 Comment

I'm not sure why this got downvoted. Using the img tag really is the best way to control the dimensions of an image within a Markdown file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.