Missing avatars after upgrade #5201

Closed
opened 2025-11-02 06:17:35 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @PaulBINK on GitHub (Apr 7, 2020).

  • Gitea version (or commit ref): 1.11.4
  • Git version: -
  • Operating system: Ubuntu
  • 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 just noticed (after recently upgrading from 1.10.1 to 1.11.4) that all avatars for users and organizations got replaced by the default gitea image. Updating the avatar works, so it's not a problem with displaying them (as in a previous issue).

The avatars do exist in data/avatars. I opened gitea.db to check the user table, and the users with a custom avatar are properly marked as having one. What did not make sense is that the name of the avatar (the file name) no longer matches the names of the files in data/avatars. I manually renamed the files to match the name in the user table, and I got all avatars back in the UI.

The issue is thus solved, but I'm rather confused as to why the names would no longer match. Was this on purpose?

Originally created by @PaulBINK on GitHub (Apr 7, 2020). - Gitea version (or commit ref): 1.11.4 - Git version: - - Operating system: Ubuntu - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description I just noticed (after recently upgrading from 1.10.1 to 1.11.4) that all avatars for users and organizations got replaced by the default gitea image. Updating the avatar works, so it's not a problem with displaying them (as in a previous issue). The avatars do exist in data/avatars. I opened gitea.db to check the user table, and the users with a custom avatar are properly marked as having one. What did not make sense is that the name of the avatar (the file name) no longer matches the names of the files in data/avatars. I manually renamed the files to match the name in the user table, and I got all avatars back in the UI. The issue is thus solved, but I'm rather confused as to why the names would no longer match. Was this on purpose?
GiteaMirror added the issue/needs-feedback label 2025-11-02 06:17:35 -06:00
Author
Owner

@guillep2k commented on GitHub (Apr 8, 2020):

Did you upgrade directly from 1.10.1 to 1.11.4 without any intermediate versions? There was a problem with avatar migration at some point, but it's supposed to be fixed several subversions ago.

@guillep2k commented on GitHub (Apr 8, 2020): Did you upgrade directly from 1.10.1 to 1.11.4 without any intermediate versions? There was a problem with avatar migration at some point, but it's supposed to be fixed several subversions ago.
Author
Owner

@PaulBINK commented on GitHub (Apr 8, 2020):

That's indeed what I did. I had read somewhere that it was not recommended to use intermediate versions and instead update to the latest one due to an issue in a previous version. If avatar migration was the issue, then it happened anyway.

@PaulBINK commented on GitHub (Apr 8, 2020): That's indeed what I did. I had read somewhere that it was not recommended to use intermediate versions and instead update to the latest one due to an issue in a previous version. If avatar migration was the issue, then it happened anyway.
Author
Owner

@guillep2k commented on GitHub (Apr 8, 2020):

No, there were other issues, especially with release attachments IIRC. The upgrade process you did is the recommended one, indeed.

We'll have to look at your issue. Thanks for reporting.

@guillep2k commented on GitHub (Apr 8, 2020): No, there were other issues, especially with release attachments IIRC. The upgrade process you did is the recommended one, indeed. We'll have to look at your issue. Thanks for reporting.
Author
Owner

@stale[bot] commented on GitHub (Jun 7, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 7, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@ginkel commented on GitHub (Jun 16, 2020):

We have also hit this issue. Avatars vanish after each deployment (based on Docker). /data is mounted as a volume, but AFAICS Gitea stores the uploaded avatars in /app/gitea/data/avatars, which is cleaned when recreating the Docker container as there is no associated volume.

Version: 1.12.0+rc2

@ginkel commented on GitHub (Jun 16, 2020): We have also hit this issue. Avatars vanish after each deployment (based on Docker). `/data` is mounted as a volume, but AFAICS Gitea stores the uploaded avatars in `/app/gitea/data/avatars`, which is cleaned when recreating the Docker container as there is no associated volume. Version: 1.12.0+rc2
Author
Owner

@stale[bot] commented on GitHub (Aug 15, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 15, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Aug 16, 2020):

@ginkel did you tested setting AVATAR_UPLOAD_PATH

as mentioned in https://docs.gitea.io/en-us/config-cheat-sheet/#picture-picture

@6543 commented on GitHub (Aug 16, 2020): @ginkel did you tested setting `AVATAR_UPLOAD_PATH` as mentioned in https://docs.gitea.io/en-us/config-cheat-sheet/#picture-picture
Author
Owner

@zeripath commented on GitHub (Feb 15, 2021):

I'm closing this issue as there has been no further reports since Aug 2020.

@zeripath commented on GitHub (Feb 15, 2021): I'm closing this issue as there has been no further reports since Aug 2020.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5201