Chapter 4. Using Avatars


Use avatars in the Admin console and Account console.

Both the admin and account consoles allow use of an avatar to personalize the user experience. Red Hat build of Keycloak supports avatars using the oidc standard picture claim.

This picture claim should have a URI as its value. The URI should point to the avatar meant to be displayed in the masthead section of the admin console or account console.

The simplest way to allow users to specify the avatar URI is to add a picture attribute in User profile. Just go to the admin console and navigate to the Realm Settings User profile tab.

Here is an example setup of the picture attribute:

Figure 4.1. User profile picture attribute setup in admin console

picture attribute general settings

4.2. Avatar success

Here is the result in account console once the URI is saved for the picture attribute:

Figure 4.2. Avatar shown in account console

account console with avatar

4.3. Important warning

Important

Allowing users to specify their own URI could lead to security concerns. An avatar can contain malware. So ensure that images come from a trusted source. One practical approach is to make sure that the picture has a regular expression validator to restrict the URI.

Figure 4.3. RegExp validator for User profile picture attribute

avatar validation
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top