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?
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.
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.
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.
![](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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With