The changes from https://github.com/nextcloud/server/pull/18745 need to be ported to core/src/jquery/avatar.js as well. @matchish Do you want to take care of this?