Attention
TYPO3 v12 has reached end-of-life as of April 30th 2026 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here: TYPO3 ELTS.
Avatar ViewHelper <be:avatar>
Note
This ViewHelper is not available by default.
Import its namespace
{namespace be=TYPO3\ in the Fluid file or
xmlns: in the opening HTML tag.
Render the avatar markup, including the
<img> tag, for a given backend user.
Examples
Default
<be:avatar backendUser="{user.uid}" size="32" showIcon="true" />
Output:
<span class="avatar">
<span class="avatar-image">
<img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/avatar/svgs/avatar-default.svg" width="32" height="32" alt="" />
</span>
</span>
If the given backend user hasn't added a custom avatar yet, a default one is used.
Inline notation
{be:avatar(backendUser: user.id, size: 32, showIcon: 'true')}
Output:
<span class="avatar">
<span class="avatar-image">
<img src="/fileadmin/_processed_/7/9/csm_custom-avatar_4ea4a18f58.jpg" width="32" height="32" alt="" />
</span>
</span>
Go to the source code of this ViewHelper: AvatarViewHelper.php (GitHub).
Arguments
The following arguments are available for the avatar ViewHelper:
backendUser
-
- Type
- int
- Default
- 0
uid of the backend user
showIcon
-
- Type
- bool
- Default
- false
show the record icon as well
size
-
- Type
- int
- Default
- 32
width and height of the image