Skip to content

Images in wiki repo (not in root but in subdirectory) respond 404 #9166

@hnlxl

Description

@hnlxl
  • Gitea version (or commit ref): 1.10.0
  • Git version:
  • Operating system: CentOS 7 (gitea server)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I clone the wiki repo, push the images to the repo, and use relative path in the MD file. But, when I open the wiki page, the image is not show, because of it's response code is 404.

After many attempts, I found that if the images is in the root directory, it can be accessed, otherwise not.

E.g:

Relative Path Real Url Accessed
test.png http://192.168.0.1:3000/user/project/wiki/raw/test.png YES
img/test.png http://192.168.0.1:3000/user/project/wiki/raw/img/test.png NO

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions