The small picture or initials that stand for a person. Learn photo, initials and icon avatars, cropping, fallbacks when a photo fails, initials for every kind of name, colors, groups and presence dots, then hunt six bugs on a team page.
30–45 min Content & layout Web · iOS · Android Also called: Profile picture, Profile photo, User image, Initials avatar, Avatar group, Facepile
Your progress
On a team page, one colleague’s picture is a broken image icon. Another’s face is squeezed thin. A third shows “đš” in lowercase, and a fourth is green in the list but blue on his profile. You change your own photo, see “Photo updated”, close the window, and your old picture is still in the corner.
Avatars are tiny, but they’re how people recognise each other in an app: in comments, chats, assignees, shared documents. When they’re wrong, people notice instantly, and some avatar bugs (a stale photo, the wrong person’s picture) touch privacy.
Part Not started
What is it?
An avatar is a small image that stands for a user, a team or an account. There are three kinds, and a good avatar falls back through them in this order:
Photo: the user’s uploaded picture (or one from a sign-in provider like Google or Apple).
A user has no photo. What should a good avatar show?
The order is photo, then initials, then a generic icon when there's no name.
An avatar group shows three faces and "+5". What must be true?
The visible faces plus the number must equal the total.
An avatar represents a person or account with a photo, initials or a generic icon, in several sizes and shapes, sometimes with a presence dot or grouped with others.
Part Not started
When to use it
An avatar is the right choice when:
The screen is about people: comments, chat messages, assignees, team members, who shared a document.
Users need to spot a person quickly in a list, faster than reading every name.
The app shows who is signed in, usually as a small avatar in the header that opens the account menu.
It’s the wrong choice when the thing isn’t a person, a team or an account. A product, a file or a category gets a thumbnail or an icon instead.
Good and bad uses
Avatar plus name where the person matters
In a comment or a task list, the avatar sits next to the full name: the picture helps you find the person, and the name tells you who it is for sure.
Avatar alone for an important decision
“Assign to” shows only six small circles. Two colleagues have the same initials, and one photo failed to load. The user has to guess.
A small group with an honest count
A shared document shows three faces and “+5”. The user sees at a glance that eight people have access, and can tap to see all of them.
Every face in a row
A row of forty avatars pushes the title off the screen, loads forty photos and still doesn’t tell the user how many people there are.
Check this part
Which screen is a good place for avatars?
Avatars stand for people, teams or accounts. In a comment thread they show who wrote what.
An "Assign to" picker shows only small avatars, without names. What's the risk?
Where the person matters, the name stays next to the avatar. The picture helps you find them; the name tells you who it is.
Use an avatar where people need to recognise who did something; keep the name next to it when the person matters, and don't use it for things that aren't people or accounts.
Part Not started
How a good avatar behaves
Photos
Cropped, not stretched. A landscape or portrait photo fills the circle and is cropped around the center (ideally the face). It is never squeezed.
Sharp on every screen. A 40 px avatar on a high-density phone needs an image of at least 120 px, or it looks blurry.
Fast: small files for small avatars. A list of 50 people shouldn’t download fifty full-size photos.
Fails gracefully: if the photo doesn’t load (deleted, slow network, blocked), the avatar shows initials, not the browser’s broken image icon or an empty hole.
Initials
Names are more varied than test data usually is. Test:
Name
Expected initials
Typical bug
Ana Ćirić
AĆ
“AÄ” (encoding) or “A?”
đorđe šimić (typed lowercase)
ĐŠ
“đš”: not upper-cased
Ludwig van Beethoven
LB (first and last word)
“Lv”: first two words
Prince
P
“P” plus “undefined” or a stray letter
李小龙
李
Empty, or a broken character
(empty name)
Generic icon
An empty colored circle
An emoji in the name
A sensible fallback
Half an emoji (a broken character)
Colors
From the name or user ID, not from position. The same person must have the same color in the list, the profile, the comments and the chat. A color based on the row number changes when the list is sorted.
When the user changes their photo, every place shows the new one: the header, the lists, comments, other users’ screens, emails and the mobile app (after a reasonable delay). Old photos cachedCacheStored copies of data or files that make apps and websites load faster.Open in glossary → by the browser or a CDN are a common bug, and when the user removed a photo for privacy reasons, a stale copy matters.
Try it
Avatar lab
Correct
ĐŠ
Initials “ĐŠ”, color from the name
Common mistake
đš
Initials “đš”
Check this part
Avatar colors are chosen by the row number in the list. What's the problem?
Colors should come from something stable, such as the name or user ID.
What should initials be for "Ludwig van Beethoven"?
The usual rule is the first letter of the first and last word, upper-cased. Check the spec, then test names with particles like "van" and "de".
Photos are cropped to fill, failed photos fall back to initials, initials work for every kind of name, colors come from the name and stay the same everywhere, and changes show everywhere.
Old photo in the header or other screens after a change
Medium (High if removed for privacy)
7
Blurry photo
A tiny image scaled up on a sharp screen
Low
8
Wrong person
Someone else’s photo after logout or account switch
High (privacy)
9
Low contrast
White initials on a yellow background
Medium (accessibility)
10
Heavy images
A list loads full-size photos for 24 px avatars
Medium (performance)
Bug hunt
This team page in a workspace app has six avatar bugs. Explore it:
Look closely at every avatar in the list and in the header group.
Open members’ profile cards and compare them with the list.
Count the members, then read the group in the header.
Click your own avatar in the top right, change your photo, then close the window.
🐞 Bug hunt: Acme team page
This demo has 6 hidden bugs. Explore it like a tester, then check your findings.
Found0/6
app.acme.test/team
Teamđš+2
1
Hint: Look at the 4th member in the list.
Tomás's photo shows a broken image instead of initials
His photo URL fails to load, and the list shows the browser's broken image (and part of the alt text) inside the circle. His profile card correctly shows TR. Expected: the list falls back to initials too.
2
Hint: Compare Sara in the list with her profile card.
Sara's photo is stretched
Her photo is a wide landscape picture. The list squeezes it into the circle (no cropping), so her face looks narrow. The profile card crops it correctly. Expected: crop to fill everywhere.
3
Hint: Read the initials for đorđe šimić and Ludwig van Beethoven.
Initials are lowercase or taken from the wrong words
The list shows đš and Lv: the first letter of the first two words, without upper-casing. The profile cards show ĐŠ and LB. Ana Ćirić is right in both places (AĆ). Expected: one rule everywhere, upper-cased, first and last word.
4
Hint: Note Leo Marin's avatar color in the list, then open his profile.
The same person has a different color in the list and on the profile
The list colors avatars by row number, the profile card by name, so Leo is cyan in the list and green on his card (Ana and others change too). Sorting the list would change everyone's color. Expected: the color comes from the name or user ID, everywhere.
5
Hint: Count the members in the list, then read the group next to the title.
The avatar group says +2, but 5 members are hidden
There are 8 members and the group shows 3 faces, so it should say +5. It says +2. Expected: faces shown + number = total members.
6
Hint: Click your avatar in the top right, choose a new photo, close the window.
Your new photo doesn't appear in the header or in the list
"Photo updated" appears and the settings preview changes, but the header and your row in the list still show the old photo (your own profile card updates). Expected: every place shows the new photo right away.
Check this part
Why compare the list with the profile cards in the bug hunt?
Comparing the same data on two screens is one of the fastest ways to find display bugs.
A user removes their photo for privacy, but other users still see it in comments. How severe is that?
Caching explains it, but doesn't excuse it. Removed photos must disappear everywhere within an agreed time.
Broken image icons, stretched photos, wrong initials, colors that change between screens, wrong group counts and stale photos, and a team page to find six of them on.
Part Not started
How to test it
Start without any tools. Find a screen that uses this component and use it the way a real user would: slowly, then fast, then in ways nobody planned for. Tick off the checklist as you go. Most of it needs only your eyes and your fingers.
Then try the example test cases. Some of them need a little setup:
Rotation: switch off the rotation lock, then turn the phone sideways and back.
New to this? Do the checklist first and skip any test case whose setup you don’t know yet.
Checklist
Avatar test checklist
0 of 10 checked
Example test cases
TC-AVA-001Photos of every shape are cropped, not stretchedpositivemedium
Steps
Upload each photo as the profile picture
Check the header, lists, comments and profile page
Test data
Square, 2:1 landscape and 1:2 portrait photos
Expected result
Each avatar fills its circle with the photo cropped around the center. No face is squeezed or stretched.
TC-AVA-002A failed photo falls back to initialsnegativemedium
Steps
Block the avatar image URL in DevTools (Network › right-click › Block request URL)
Reload the page
Expected result
Initials on a colored background appear wherever the avatar is shown. No broken image icon or empty circle.
TC-AVA-003Initials for different kinds of namesedgemedium
Steps
Create test users with the names above and no photo
Check their avatars in a list and on the profile
Test data
Ana Ćirić · đorđe šimić · Ludwig van Beethoven · Prince · 李小龙 · (empty)
Expected result
AĆ, ĐŠ, LB, P, 李 and a generic icon, the same on every screen.
TC-AVA-004Avatar colors stay the same across screens and sortingpositivelow
Steps
Note the colors of three members without photos in the team list
Sort the list differently
Open their profiles and a comment they wrote
Expected result
Each member keeps the same color everywhere.
TC-AVA-005A changed or removed photo updates everywherepositivehigh
Steps
Change the profile photo
Check the header, lists and comments without reloading
Log in as another user and check the same places
Remove the photo and repeat
Expected result
All places show the new photo, then initials after removal, within the agreed time. No old photo remains.
TC-AVA-006Avatar group countedgemedium
Steps
Open each group
Compare the faces and number with the member list
Test data
Groups with 1, 3, 4 and 50 members (3 faces shown)
Expected result
No "+0"; faces shown + number = total; large numbers are formatted (for example +47 or 99+, as the spec says).
Tip: click a test case to expand it.
A checklist and example test cases: photo shapes and failures, names from many languages, consistent colors, group counts, photo changes and removal, sizes and performance.
On the web, alt="" on decorative avatar images and a text alternative on standalone ones. For a group, a visually hidden list or aria-label on the group. On iOS, accessibilityLabel on the avatar button; on Android, contentDescription, or null when decorative.
Mobile vs web
Photos come from the Photos picker or the camera, usually with a square or circular crop step. Check that the crop result is what’s shown.
Sign in with Apple doesn’t share a photo, so expect many initials avatars.
Caching: after a change, check other tabs, another browser and another user. Image URLs often include a version so the new photo appears.
Gravatar and SSO photos: if the app uses them, test a user without one.
Check this part
An avatar sits right next to the user's name in a list. What should a screen reader do with it?
Next to the name it's decoration. A standalone avatar needs the person's name instead.
How do you test the photo fallback on the web without deleting anything?
Blocking the request makes the photo fail exactly like a missing file would.
When avatars need alt text and when they're decorative, presence that isn't color only, contrast and touch targets, plus how avatars work on iOS, Android and the web.
Key takeaways
Avatars fall back from photo to initials to icon. A broken image icon is always a bug.
Photos are cropped to fill, never stretched, and sharp at every size.
Test initials with real names: accents, lowercase, particles like “van”, single names, non-Latin scripts, empty names.
Colors come from the name or ID, so a person looks the same everywhere, and initials stay readable.
Avatar groups must count right: faces + number = total.
A changed or removed photo must update everywhere, including other users’ screens. Stale photos can be privacy bugs.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.