local gif/image path fix to render them on profile README.md

Summary

When including an image/gif into the profile README.md page with local file path from repo, the path gets confused and redirects to gitlab.com/image_file_path, instead it should take the repo_path/image_file_path to render the image/gif like it does in github.

Steps to reproduce

Include the local image path from the repo instead of absolute file URL to render it in profile README.md page.

Example:

This renders the gif properly on the README.md profile page

img src="https://gitlab/user/repo/-/raw/main/funny.gif/" alt="img desciption"

This does not render the gif instead it shows alt text and points the file path to https://gitlab.com/funny.gif (the file is at home folder of the repo)

img src="funny.gif" alt="img desciption"

img src="/funny.gif" alt="img desciption"

Example Project

Any profile README.md page which uses a local image/gif path to render it.

What is the current bug behavior?

Does not render images if local repo image path is given as the image path.

What is the expected correct behavior?

Render the image/gif as it does in a normal repo README.md with local file path.

Output of checks

This bug happens on GitLab.com

Edited Jun 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading