Verified Production Fix
[gitlab-org/gitlab] Ico images don't embed in markdown
GL-gitlab-org/gitlab#592613 • Mar 08, 2026
### ROOT CAUSE
The issue arises because GitLab does not recognize ICO images as embeddable formats in Markdown. Additionally, when GitLab generates the URL for the image, it might use a non-raw URL, which prevents the image from being rendered correctly.
### CODE FIX
To resolve this issue, you can add ICO images to the list of allowed/embeddable image formats for Markdown rendering in GitLab. This can be done by modifying the configuration files where GitLab defines its supported image formats.
1. **Modify the Configuration File:**
Locate the configuration file where GitLab defines its supported image formats. This is typically found in the `gitlab.rb` file or a similar configuration file depending on your GitLab installation.
2. **Add ICO to the List of Supported Formats:**
Add `image/x-icon` and `image/vnd.microsoft.icon` to the list of supported image formats. Here is an example of how you might modify the configuration:
ruby
gitlab_rails['gitlab_markdown_image_formats'] = ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/x-icon', 'image/vnd.microsoft.icon']
3. **Reconfigure GitLab:**
After making the changes to the configuration file, you need to reconfigure GitLab to apply the changes. This can typically be done by running the following command:
sh
sudo gitlab-ctl reconfigure
4. **Verify the Fix:**
Once the reconfiguration is complete, verify that ICO images are now being rendered correctly in Markdown files. You can do this by adding an ICO image to a README and checking how it appears in the browser.
By following these steps, you should be able to resolve the issue with ICO images not embedding correctly in Markdown on GitLab.
Deploy with Vultr
Use this fix in production instantly. Claim your high-performance developer credit.
Get Started with Vultr →
digital