Twig: Display media library reference user image at particular resolution with alt tag (on /user/1231 page)
but node is null since this is not on a node

In user template there is {{ user }} variable wich holds user entity. So just replace &quot;node&quot; with &quot;user&quot; in your snippets.