Gitea fails to serve png files correctly. #1856

Closed
opened 2025-11-02 04:15:20 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @lewisakura on GitHub (Jun 4, 2018).

Description

Gitea seems to fail to serve custom png files hosted under /custom/public/. It doesn't display the regular 404 though, it displays the browser's default 404 page. I have also observed this behavior even though the png files do not exist. This makes it almost impossible to customize the homepage and the navbar images.

If the images are already built in to Gitea (such as /img/gitea-lg.png) it doesn't cause this issue, it just uses the built in copy.

In the third and fourth screenshot I have provided a screenshot that shows that other file types work correctly, even if they don't exist.

Screenshots

404
non-existent
hello.txt
i-dont-exist

Originally created by @lewisakura on GitHub (Jun 4, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.4.1 - Git version: Not relevant - Operating system: Ubuntu 17.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) https://try.gitea.io/test.png - [ ] No - [ ] Not relevant - Log gist: https://gist.github.com/LewisTehMinerz/ebc0c8018857b241f563fdba6f7d3c25 (contains the lines from the log that issue the 404s) ## Description Gitea seems to fail to serve custom `png` files hosted under `/custom/public/`. It doesn't display the regular 404 though, it displays the browser's default 404 page. I have also observed this behavior even though the `png` files do not exist. This makes it almost impossible to customize the homepage and the navbar images. If the images are already built in to Gitea (such as `/img/gitea-lg.png`) it doesn't cause this issue, it just uses the built in copy. In the third and fourth screenshot I have provided a screenshot that shows that other file types work correctly, even if they don't exist. ## Screenshots ![404](https://living-the.speedboat.life/168a91.png) ![non-existent](https://living-the.speedboat.life/kb1n55.png) ![hello.txt](https://living-the.speedboat.life/6q9c2i.png) ![i-dont-exist](https://living-the.speedboat.life/tffwas.png)
Author
Owner

@stale[bot] commented on GitHub (Jan 25, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 25, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@zeripath commented on GitHub (Jan 25, 2019):

Works for me on try.

Are you sure you have the capitalisation correct?

@zeripath commented on GitHub (Jan 25, 2019): Works for me on try. Are you sure you have the capitalisation correct?
Author
Owner

@lewisakura commented on GitHub (Jan 25, 2019):

Considering this issue is about 7 months old I would believe that it was fixed. However, this was a very large bug that really screwed up my customization of Gitea.

@lewisakura commented on GitHub (Jan 25, 2019): Considering this issue is about 7 months old I would believe that it was fixed. However, this was a very large bug that really screwed up my customization of Gitea.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1856