Images do not display anymore on the Wiki pages (they do in the preview)

Summary

Uploaded images do not display anymore on the Wiki pages, but they do in the preview. The issue may have appeared since the update from GitLab 13.7.3 to 13.7.4 (I'm not 100% sure).

The links look like this: ![image](/uploads/[hash]/image.png). Changing them manually to ![image](uploads/[hash]/image.png) (removing the leading slash) fixes the link.

The working images in preview mode have this kind of url: https://gitlab.example.com/group/subgroup/project/uploads/[hash]/image.png

whereas the broken links are like this: https://gitlab.example.com/uploads/[hash]/image.png (the group/subgroup/project part is missing)

Steps to reproduce

  • Create an issue, and upload an image
  • Copy the Markdown of the issue (it contains something like this: ![image](/uploads/[b6ea4dc0560dbaeb4ba10e4ff0011fd1]hash]/image.png))
  • Create a new Wiki page in the same project
  • Paste the Markdown

What is the current bug behavior?

The image appears is the preview mode, but not in the page when saved (404 error).

It happens on old Wiki pages, but not when uploading new files.

What is the expected correct behavior?

The image appears.

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		Ubuntu 16.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.7.2p137
Gem Version:	3.1.4
Bundler Version:2.1.4
Rake Version:	13.0.1
Redis Version:	5.0.9
Git Version:	2.29.0
Sidekiq Version:5.2.9
Go Version:	unknown

GitLab information
Version:	13.7.4-ee
Revision:	368b4fb2eee
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	12.4
URL:		https://git.xxx.com
HTTP Clone URL:	https://git.xxx.com/some-group/some-project.git
SSH Clone URL:	git@git.xxx.com:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: 

GitLab Shell
Version:	13.14.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 13.14.0 ? ... OK (13.14.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 23/2 ... yes 23/3 ... yes 23/4 ... yes 23/5 ... yes 23/6 ... yes 23/8 ... yes 23/10 ... yes 23/11 ... yes 23/12 ... yes 10/13 ... yes 21/14 ... yes 23/18 ... yes 23/20 ... yes 23/21 ... yes 23/23 ... yes 23/24 ... yes 23/26 ... yes 23/27 ... yes 29/28 ... yes 23/29 ... yes 23/31 ... yes 23/32 ... yes 23/34 ... yes 110/35 ... yes 23/36 ... yes 23/37 ... yes 23/38 ... yes 23/39 ... yes 23/40 ... yes 23/41 ... yes 23/42 ... yes 23/43 ... yes 23/44 ... yes 23/45 ... yes 3/47 ... yes 23/49 ... yes 3/50 ... yes 23/51 ... yes 23/52 ... yes 23/53 ... yes 23/54 ... yes 23/56 ... yes 23/57 ... yes 23/58 ... yes 23/59 ... yes 23/60 ... yes 23/61 ... yes 23/62 ... yes 23/63 ... yes 23/64 ... yes 23/65 ... yes 23/66 ... yes 23/67 ... yes 23/68 ... yes 23/69 ... yes 23/70 ... yes 23/71 ... yes 23/72 ... yes 23/73 ... yes 23/74 ... yes 1/75 ... yes 23/76 ... yes 23/77 ... yes 23/78 ... yes 23/79 ... yes 23/80 ... yes 23/81 ... yes 23/82 ... yes 15/84 ... yes 24/85 ... yes 23/86 ... yes 23/87 ... yes 23/88 ... yes 23/89 ... yes 23/90 ... yes 110/91 ... yes 23/92 ... yes 23/93 ... yes 23/95 ... yes 23/96 ... yes 23/97 ... yes 23/99 ... yes 23/100 ... yes 23/101 ... yes 23/102 ... yes 23/103 ... yes 23/104 ... yes 23/105 ... yes 23/106 ... yes 110/107 ... yes 23/108 ... yes 23/109 ... yes 23/110 ... yes 110/111 ... yes 23/112 ... yes 36/113 ... yes 23/114 ... yes 23/115 ... yes 23/116 ... yes 23/117 ... yes 23/118 ... yes 23/119 ... yes 23/120 ... yes 110/121 ... yes 23/122 ... yes 23/123 ... yes 23/124 ... yes 23/125 ... yes 23/127 ... yes 5/128 ... yes 23/129 ... yes 23/130 ... yes 23/131 ... yes 23/132 ... yes 23/133 ... yes 23/134 ... yes 23/135 ... yes 23/136 ... yes 23/137 ... yes 110/138 ... yes 23/139 ... yes 23/140 ... yes 23/141 ... yes 23/142 ... yes 23/143 ... yes 23/145 ... yes 23/146 ... yes 23/147 ... yes 110/148 ... yes 110/149 ... yes 23/150 ... yes 3/151 ... yes 23/152 ... yes 110/153 ... yes 110/154 ... yes 110/155 ... yes 110/156 ... yes 110/157 ... yes 110/158 ... yes 110/159 ... yes 110/160 ... yes 110/161 ... yes 23/162 ... yes 23/163 ... yes 23/164 ... yes 23/165 ... yes 23/166 ... yes 23/167 ... yes 23/168 ... yes 23/169 ... yes 23/170 ... yes 23/171 ... yes 110/172 ... yes 110/173 ... yes 110/174 ... yes 23/175 ... yes 23/176 ... yes 23/177 ... yes 23/180 ... yes 23/181 ... yes 23/182 ... yes 110/183 ... yes 110/184 ... yes 110/185 ... yes 110/186 ... yes 3/187 ... yes 23/188 ... yes 23/189 ... yes 23/190 ... yes 110/191 ... yes 1/192 ... yes 1/193 ... yes 23/194 ... yes 110/196 ... yes 110/197 ... yes 23/198 ... yes 23/199 ... yes 23/200 ... yes 110/201 ... yes 23/202 ... yes 110/203 ... yes 21/204 ... yes 110/205 ... yes 23/206 ... yes 110/208 ... yes 23/209 ... yes 23/210 ... yes 23/211 ... yes 23/212 ... yes 23/213 ... yes 110/214 ... yes 23/215 ... yes 23/216 ... yes 23/217 ... yes 23/218 ... yes 23/219 ... yes 23/220 ... yes 23/221 ... yes 23/222 ... yes 23/223 ... yes 23/224 ... yes 23/225 ... yes 23/226 ... yes 110/227 ... yes 23/228 ... yes 110/229 ... yes 110/230 ... yes 23/231 ... yes 23/232 ... yes 110/233 ... yes 23/234 ... yes 110/235 ... yes 23/236 ... yes 110/237 ... yes 23/238 ... yes 23/239 ... yes 23/240 ... yes 23/241 ... yes 23/242 ... yes 110/243 ... yes 110/244 ... yes 23/245 ... yes 87/246 ... yes 87/247 ... yes 87/248 ... yes 110/249 ... yes 93/250 ... yes 93/251 ... yes 93/252 ... yes 87/253 ... yes 87/254 ... yes 23/255 ... yes 110/256 ... yes 110/258 ... yes 23/259 ... yes 110/260 ... yes 23/262 ... yes 23/263 ... yes 93/264 ... yes 23/265 ... yes 110/266 ... yes 23/267 ... yes 23/270 ... yes 93/271 ... yes 23/272 ... yes 23/273 ... yes 93/274 ... yes 93/275 ... yes 110/276 ... yes 93/277 ... yes 23/278 ... yes 23/279 ... yes 23/281 ... yes 23/282 ... yes 23/283 ... yes 1/284 ... yes 23/285 ... yes 23/286 ... yes 23/289 ... yes 23/290 ... yes 3/292 ... yes 23/293 ... yes 110/294 ... yes 102/295 ... yes 102/296 ... yes 102/297 ... yes 102/298 ... yes 23/299 ... yes 106/301 ... yes 23/302 ... yes 106/303 ... yes 106/304 ... yes 102/305 ... yes 23/306 ... yes 102/307 ... yes 110/308 ... yes 23/309 ... yes 23/310 ... yes 23/311 ... yes 110/312 ... yes 12/314 ... yes 3/315 ... yes 3/316 ... yes 23/317 ... yes 110/318 ... yes 23/319 ... yes 110/321 ... yes 21/322 ... yes 23/324 ... yes 23/326 ... yes 23/327 ... yes 23/328 ... yes 23/329 ... yes 110/330 ... yes 23/331 ... yes 23/332 ... yes 110/333 ... yes 23/334 ... yes 110/335 ... yes 23/336 ... yes 121/337 ... yes 86/338 ... yes 110/339 ... yes 110/340 ... yes 110/341 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.29.0 ? ... yes (2.29.0) Git user has default SSH configuration? ... yes Active users: ... 40 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Edited Jan 19, 2021 by Jazz
Assignee Loading
Time tracking Loading