Redirect to user/org avatar for /[username].png #10065

Closed
opened 2025-11-02 08:57:17 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @crystalcommunication on GitHub (Jan 6, 2023).

Feature Description

GitHub has this feature that allows you to get redirected to any user's avatar by simply adding .png to their profile URL (e.g. https://github.com/go-gitea.png)

It would be fantastic if Gitea could do the same thing. Interestingly, Gitea already checks for a URL like this as of https://github.com/go-gitea/gitea/pull/18798, but instead of returning anything useful, it just returns the text Not Found (not even the fancy 404 page).

If this seems like a good idea, I can get a pull request going right away.

Screenshots

No response

Originally created by @crystalcommunication on GitHub (Jan 6, 2023). ### Feature Description GitHub has this feature that allows you to get redirected to any user's avatar by simply adding `.png` to their profile URL (e.g. https://github.com/go-gitea.png) It would be fantastic if Gitea could do the same thing. Interestingly, Gitea already checks for a URL like this as of https://github.com/go-gitea/gitea/pull/18798, but instead of returning anything useful, it just returns the text `Not Found` (not even the fancy 404 page). If this seems like a good idea, I can get a pull request going right away. ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 08:57:17 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Jan 6, 2023):

Don't know why this was never implemented but it's already a long time in there (7 years):
a49af93faf

@KN4CK3R commented on GitHub (Jan 6, 2023): Don't know why this was never implemented but it's already a long time in there (7 years): https://github.com/go-gitea/gitea/commit/a49af93fafe824cdd375318d15de420b3ed61e79
Author
Owner

@crystalcommunication commented on GitHub (Jan 6, 2023):

Oh, you're right. The PR I mentioned only introduced the current code that handles it. Is there any particular reason for the current behavior? Right now it kinda just seems like it's partially implemented (though all the necessary functions exist)

@crystalcommunication commented on GitHub (Jan 6, 2023): Oh, you're right. The PR I mentioned only introduced the current code that handles it. Is there any particular reason for the current behavior? Right now it kinda just seems like it's partially implemented (though all the necessary functions exist)
Author
Owner

@KN4CK3R commented on GitHub (Jan 6, 2023):

Don't think so, go for it.

@KN4CK3R commented on GitHub (Jan 6, 2023): Don't think so, go for it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10065