Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reference an image in GitLab markdown in the current directory with the path starting with ./ dot slash?

I have stored a Markdown file and an image file in a Git repo as follows:

  • readme.markdown
  • images/
    • image.png

I reference the image from readme.markdown like this:

![](./images/image.png) 

This renders as expected in ReText, but does not render when I push the repo to GitLab.

How can I reference the image from the Markdown file so that it renders when viewed in GitLab?

like image 693
lofidevops Avatar asked Nov 19 '14 11:11

lofidevops


People also ask

How do I add an image to GitLab markdown?

To insert images to your markdown file, use the markup ![ ALT](/path/image. ext) . The path can either be relative to the website, or a full URL for an external image.

What markdown does GitLab use?

GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few significant ways to add some useful functionality. It was inspired by GitHub Flavored Markdown. You can also use other rich text files in GitLab.

Does GitLab render markdown?

GitLab Flavored Markdown automatically renders Markdown content in an easy-to-read and easy-to-write plain text language. Although Markdown is inherently more “human-readable” and versatile when writing rich web content, Markdown files can become tricky to work with as they become more verbose and complex.


1 Answers

![](images/image.png) without the ./ works for me: https://gitlab.com/cirosantilli/test/blob/bffbcc928282ede14dcb42768f10a7ef21a665f1/markdown.md#image

I have opened a request for this to be allowed at: http://feedback.gitlab.com/forums/176466-general/suggestions/6746307-support-markdown-image-path-in-current-directory-s , but it entered into Internet void when GitLab dumped UserVoice.