Making use of local user image or Gravatar in Twig

As a learning experience, I’m creating an inherited theme from Lingonberry.

Notice that the partial, header.html.twig, makes a reference to

What I’d like to do is to use (does that exist?) or possibly (does that exist?)

I haven’t been able to find this in the documentation, but maybe I’m looking in the wrong place.

Or does (for example) work even for local “avatars”?

I see that \Grav\Common\User\DataUser\User exposes getAvatarUrl(), but how do I do that from a Twig template?