Cannot upload avatar file via the GitLab API

I cannot upload an avatar file of a project using the GitLab API on salsa.d.o. I am using a command like this (see the documentation):

curl --request PUT --header "PRIVATE-TOKEN: XXXXXX" --form "avatar=@file.png" "https://salsa.debian.org/api/v4/projects/63559"

It returns:

{"error":"avatar is invalid"}

This works perfectly on another GitLab server to which I have access.

Edited by Rafael Laboissière
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information