I first changed the path under Avatar Settings to be “/public_html/avatars” and this allowed me to upload the file. Having looked at the code I think it was allowed because the directory “/home/username/public_html/avatars” did exist.

The problem for me was that the function avatar_root() in avatars.php was returning /home/username but my site was found under /home/username/public_html. I’m not sure if this is a limitation/bug of the function itself or something to do with the strange setup of my web host.