Default profile image isn't using 'Name' field initials

According to Auth0 documentation, the default user.picture property should show the user’s initials:
https://auth0.com/docs/users/change-user-picture

e.g if the name is John Doe, JD should be displayed

However, it seems like it uses the first two characters of the email instead, please see image below

How could I configure the settings so that the image shown will contain initials (JD) rather than the first two characters (JO) ?

Thanks in advance.

Hi @Otis,

Welcome to the Auth0 Community!

First, I want to clarify that users created with the name property on the Management API are the only way for the user picture to show the initials.

Users created without the name property or users who sign up by themselves will find the same observations as you, where the first two letters are used as the user picture.

Now, I’d like to emphasize that the picture associated with the user profile is an image generated by Gravatar of their initials. Thus, changing the picture from JO to JD will mean replacing the image, which you’ll have to find the source.

In this case, I’d recommend that you create your users with the name attribute with the Management API to accomplish the correct initialed user picture.

Similarly, when users sign up on your application, you’ll need to have additionalSignUpFields for the name attribute:

var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
  additionalSignUpFields: [{
    name: "name",
    placeholder: "Enter your full name",
    storage: "root"
  }],
  // redacted for brevity

Once that is complete, the picture generated will always be the initials of the user.

Our Lock Configuration Options goes in greater detail on how to configure the additionalSignUpFields.

Hoped this helps!

Please let me know if there’s anything else I can do to help.

Thank you.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.