Avatar width resize won't work

We’ve just setup GitLab Community Edition 13.7.1 on a new server, moving all the data and files from the old location. All the avatars got broken. They’re still available by direct URLs, but ?width=XX parameter won’t work, the pictures are either empty or in original size. What can cause that?