User avatar breaks after changing the base URL
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Scenario1
User avatar is broken in page restriction dialog and "atl" HTML attribute is shown instead. The following screenshot was taken when I tried to search a user (e.g. "test") in the dialog.

Scenario2
User avatar is broken when mentioning user. The following screenshot was taken when I tried to mention a user (e.g. "test") in a page.

Diagnosis
Is the affected user managed in any external user management system? (e.g. Jira User Server, LDAP)
Did you currently update the Confluence base URL? (e.g. http://example.com/confluence → http://example.com)
Let's open developer tool on your browser to see which URL Confluence is trying to download the avatar file from
You must see that the avatar URL still refers to the old context path (e.g.
/confluence
/images/icons/profilepics/default.png
)
There are several similar problems but this is not the case
Broken avatars/icons in Confluence after an upgrade due to corrupted cache
Flushing the caches didn't solve the problem
After Adding a Context Path to the Base URL, Icons Appear as Broken Images
Confirmed
server.xml
andconfluence.cfg.xml
had been updated correctly
Cause
Confluence has the user avatar URL information in Lucene indexes as well and just changing the base URL doesn't update it due to CONFSERVER-54158 - User avatar image breaks after changing the base URL.
Solution
Resolution
Rebuilding the search index solves this problem.
Was this helpful?