Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Add user profile picture

default discord avatar
.gustavocardosolast year
4

I just added an upload fiels to my User collection. Is it possible to display this image instead of the default user icon in the sidebar?

  • You can create a custom avatar component that will allow you to do this. Check out the

    avatar

    property here:

    https://payloadcms.com/docs/admin/overview#admin-options


    Combine that with the

    useAuth

    hook to get the user and you should have all that you need 👍



    https://payloadcms.com/docs/admin/hooks#useauth
  • default discord avatar
    .gustavocardosolast year

    Thank you for your answer. i'll take a look at those links you sent me!

  • default discord avatar
    txjxsx7 months ago

    hi @Gustavo Cardoso , know this is late but did you get around with uploading user profile pictures, i didn't get the answer above.

  • default discord avatar
    chandrashekharfakirpure4 months ago

    Can you please share the custom component code?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.