Gravatar Integration¶
Atlas ERP can automatically fetch user profile pictures using Gravatar (Globally Recognized Avatars), based on the user's email address.
How It Works¶
Gravatar works by hashing the user's email address and requesting an image from the Gravatar servers using that hash. If the user has uploaded a profile picture to Gravatar, it will be displayed; otherwise, a default fallback image (like an identical geometric pattern or initials) is shown.
Configuration¶
Gravatar integration is generally seamless and requires no server-side secrets for basic avatar fetching.
However, if you wish to use the Gravatar API for advanced features (like updating user profiles), you may need API credentials.
Backend (apps/api/.env):
Frontend Implementation¶
In the frontend, we use utility functions to generate the correct Gravatar URL.
This URL can then be passed directly into the src/components/ui/avatar.tsx component.