# Avatars gone after upgrading to 1.20.3

**URL:** <https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833>\
**Category:** Install/Maintain/Configure\
**Created:** [September 13, 2023, 5:53pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833 "2023-09-13T17:53:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [September 13, 2023, 5:53pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/1 "2023-09-13T17:53:57Z")

</div>

It seems like the avatars from all users of my gitea instance are gone after updating from 1.20.3. I don’t remember what version I used before, it was either 1.19.x or 1.20.2.

The issue looks like this:

 ![grafik](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/e/e821743bea695be9b7ac85a64cc4a88306c35df3.png)

The files are still present on the server and have the correct permissions:

```auto
gitea@machine:~/data/avatars$ ls -l
insgesamt 272
-rw-r--r-- 1 gitea gitea 42119 Mär 13 2020 2dccbab95b05b0c2129cd89f3cb44e93
-rw-r--r-- 1 gitea gitea 88730 Mär 13 2020 37f7a7cfa63c0d8bdb48fd53b8ed15fe
-rw-r--r-- 1 gitea gitea 88662 Feb 12 2018 5068956a6e42c34fe50ea33217f65b57
-rw-r--r-- 1 gitea gitea 1260 Mär 13 2020 6ecb852e8ce1b3cd5b0dfb3e2329fbf8
-rw-r--r-- 1 gitea gitea 1595 Mai 26 2020 7
-rw-r--r-- 1 gitea gitea 42215 Feb 12 2018 9896d479bd67a9a335d318b5ab97ef2d

```

What could be causing this?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [September 14, 2023, 6:39am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/2 "2023-09-14T06:39:09Z")

</div>

This maybe caused by the storage path parse method changed. Could you paste your avatar storage configurations in your app.ini?

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [September 14, 2023, 8:42pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/3 "2023-09-14T20:42:40Z")

</div>

That section looks like this:

```auto
[picture]
AVATAR_UPLOAD_PATH = data/avatars

```

If it’s meant to be a relative path to the binary, then it seems to be a valid path (compare with the output of ls from the initial post).

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [September 16, 2023, 9:51am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/4 "2023-09-16T09:51:56Z")

</div>

Do you need more info than that?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [September 21, 2023, 6:56am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/5 "2023-09-21T06:56:49Z")

</div>

Could you paste your other configurations? Especially `[storage]`. And you can also try change `[picture] AVATAR_UPLOAD_PATH = data/avatars` to an absolute path or change it to `[picture] AVATAR_UPLOAD_PATH = avatars` and take a look whether it fix your problem.

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [September 21, 2023, 9:34am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/6 "2023-09-21T09:34:29Z")

</div>

> [@lunny](#):
>
> change `[picture] AVATAR_UPLOAD_PATH = data/avatars` […] to `[picture] AVATAR_UPLOAD_PATH = avatars`

That fixed it, thanks a lot!

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [September 21, 2023, 9:37am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/7 "2023-09-21T09:37:28Z")

</div>

I have some other relative path variables with prefixed `data/` in my conf file. For instance:

```auto
[lfs]
; Where your lfs files put on, default is data/lfs.
PATH = data/lfs

[attachment]
; Whether attachments are enabled. Defaults to `true`
ENABLE = true
; Path for attachments. Defaults to `data/attachments`
PATH = data/attachments

```

Are all of these wrong now and also need to be corrected? This used to be a default setting some time ago, so a breaking change like this wouldn’t be great to happen so silently.

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [September 25, 2023, 8:17am UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/8 "2023-09-25T08:17:33Z")

</div>

Maybe you can try to change `PATH=data/attachments` to `PATH=attachments`.

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [October 3, 2023, 2:50pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/9 "2023-10-03T14:50:52Z")

</div>

I still don’t understand why I’d change `PATH = data/attachments` and `AVATAR_UPLOAD_PATH = data/avatars` to `PATH = attachments` and `AVATAR_UPLOAD_PATH = avatars` but leave `PATH = data/lfs` the way it is?

Just to be clear, only some path settings (like avatars and attachments) need to have the `data` directory removed and some still need to have it present (like LFS data)?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [October 4, 2023, 2:08pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/10 "2023-10-04T14:08:24Z")

</div>

That’s because the relative path’s base path changed. Before it will be app path, now it becomes data path. Sorry for the break, I think we have notices on release notes.

---

<div class="post-metadata">

**Author:** ![Schroedingers-Cat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/schroedingers-cat/32/4038_2.png) [@Schroedingers-Cat](https://forum.gitea.com/u/Schroedingers-Cat)\
**Post date:** [October 27, 2023, 3:11pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/11 "2023-10-27T15:11:54Z")

</div>

My question was why to change only the path of attachments and leave other path variables like lfs the way they are. Turns out, you have to change all path variables, so also the LFS path variable needs to be changed from `PATH = data/lfs` to `PATH = lfs`. Otherwise there’ll be issues when cloning a repo with LFS data.

---

<div class="post-metadata">

**Author:** ![florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@florian](https://forum.gitea.com/u/florian)\
**Post date:** [March 14, 2024, 1:54pm UTC](https://forum.gitea.com/t/avatars-gone-after-upgrading-to-1-20-3/7833/12 "2024-03-14T13:54:08Z")

</div>

If the app.ini is read only (e.g. because it is mapped into a docker container as read only file) gitea can’t write the work path as WORK\_PATH to the app.ini file on startup. Instead of changing all the default relative paths you could try to just set WORK\_PATH to the correct location.

See [Refactor path & config system (#25330) by wxiaoguang · Pull Request #25416 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/pull/25416) for some additional options to set the work path.

The PR is mentioned in the release notes but sadly there is no hint about this issue yet.
