Skip to content

Relative image links in profile README do not display

Summary

Images in profile README with a relative path do not display when viewing the README from the profile page itself. They do however display correctly when directly viewing the project.

For example:

[![myimage](./myimage.svg)](#)

will not appear on your profile, it only displays when viewing the project directly. To get the image to display from the profile you have to use an absolute path like this:

[![myimage](https://gitlab.com/my-profile/my-profile/-/raw/main/myimage.svg)](#)

Steps to reproduce

  1. Create project with the same name as your user to create a profile README
  2. Add an image to the repository
  3. Use a relative link to that image in the markdown file

Example Project

https://gitlab.com/Kody-Quintana/Kody-Quintana shows the behavior on its previous commit (it currently correctly displays the image with an absolute path because I want to have this working for now)

What is the current bug behavior?

The image does not display, instead the text within the [...] brackets is displayed

What is the expected correct behavior?

The image should display

Relevant logs and/or screenshots

N/A

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes

N/A

Edited by Kody Quintana