Skip to content
Bugwise
Menu
UI Components

Avatar

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

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:

  1. Photo: the user’s uploaded picture (or one from a sign-in provider like Google or Apple).
  2. Initials: one or two letters on a colored background, when there’s no photo or it fails to load. This is an initials avatarInitials avatarAn avatar that shows a person's initials on a colored background when there's no photo or it fails to load.Open in glossary →.
  3. Icon: a generic person silhouette, when there’s no name either.

Variations

VariationExamplesWatch out for
Sizes24 px in a comment, 40 px in a list, 96 px on a profileInitials readable at the smallest size
ShapesCircle for people, rounded square for teams or appsThe same entity always uses the same shape
Presence dotGreen online, yellow away, gray offlineSee Badge; never color alone
Avatar group (facepile)Three faces and “+5”The count must be right
Editable avatarProfile settings with “Change photo”Upload and cropping: see Image Upload

Check this part

  1. A user has no photo. What should a good avatar show?

  2. An avatar group shows three faces and "+5". What must be true?

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

  1. Which screen is a good place for avatars?

  2. An "Assign to" picker shows only small avatars, without names. What's the risk?

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:

NameExpected initialsTypical bug
Ana ĆirićAĆ“AÄ” (encoding) or “A?”
đorđe šimić (typed lowercase)ĐŠ“đš”: not upper-cased
Ludwig van BeethovenLB (first and last word)“Lv”: first two words
PrinceP“P” plus “undefined” or a stray letter
李小龙李Empty, or a broken character
(empty name)Generic iconAn empty colored circle
An emoji in the nameA sensible fallbackHalf an emoji (a broken character)

Colors

Changes everywhere

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

  1. Avatar colors are chosen by the row number in the list. What's the problem?

  2. What should initials be for "Ludwig van Beethoven"?

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.

Part Not started

Common bugs

#BugWhat you seeTypical severitySeverityHow much damage a bug does to the product or the user.Open in glossary →
1No fallbackA broken image icon or empty circle when a photo failsMedium
2Stretched photoFaces squeezed thin or wideMedium
3Wrong initialsLowercase, wrong words, broken letters, “undefined”Low–Medium
4Color changesThe same person is green here and blue thereLow–Medium
5Wrong group count“+2” when five are hiddenMedium
6Stale photoOld photo in the header or other screens after a changeMedium (High if removed for privacy)
7Blurry photoA tiny image scaled up on a sharp screenLow
8Wrong personSomeone else’s photo after logout or account switchHigh (privacy)
9Low contrastWhite initials on a yellow backgroundMedium (accessibility)
10Heavy imagesA list loads full-size photos for 24 px avatarsMedium (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. 1

    Hint: Look at the 4th member in the list.

  2. 2

    Hint: Compare Sara in the list with her profile card.

  3. 3

    Hint: Read the initials for đorđe šimić and Ludwig van Beethoven.

  4. 4

    Hint: Note Leo Marin's avatar color in the list, then open his profile.

  5. 5

    Hint: Count the members in the list, then read the group next to the title.

  6. 6

    Hint: Click your avatar in the top right, choose a new photo, close the window.

Check this part

  1. Why compare the list with the profile cards in the bug hunt?

  2. A user removes their photo for privacy, but other users still see it in comments. How severe is that?

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 stretched

Steps

  1. Upload each photo as the profile picture
  2. 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 initials

Steps

  1. Block the avatar image URL in DevTools (Network › right-click › Block request URL)
  2. 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 names

Steps

  1. Create test users with the names above and no photo
  2. 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 sorting

Steps

  1. Note the colors of three members without photos in the team list
  2. Sort the list differently
  3. 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 everywhere

Steps

  1. Change the profile photo
  2. Check the header, lists and comments without reloading
  3. Log in as another user and check the same places
  4. 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 count

Steps

  1. Open each group
  2. 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.

Part Not started

Accessibility

Dev note

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

Check this part

  1. An avatar sits right next to the user's name in a list. What should a screen reader do with it?

  2. How do you test the photo fallback on the web without deleting anything?

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.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.