This fixes a regression caused by #1520 which broke the file extension detection thereby breaking avatars