Forum Discussion
Office 365 Profile picture not displayed inside SharePoint People Web Part on Modern Site Page
- Apr 24, 2018
This issue is fixed now for the customer. Using Microsoft Support, they were able to make required changes serverside which caused the issue for some Office 365 users. For some users specific users attributes were not set, for others they were according to Microsoft, although were not able to change these from our side. Microsoft changed things serverside to handle this. After a serverside sync update, the Office 365 profile pictures also started to display for each user inside the SharePoint People web part on Modern Site Pages.
I'd put money on the SharePoint Web Part using a different API to fetch the photo than everywhere else. There are many ways to fetch photo, some are SharePoint Server and SharePoint Online friendly, some are not.
Try accessing this url (replacing with a real email address in your tenant and tenant in host url):
https://tenantname.sharepoint.com/_vti_bin/DelveApi.ashx/people/profileimage?size=S&userId=username@teanntname.onmicrosoft.com
and then try this one (Server and Online friendly)
https://tenantname.sharepoint.com/_layouts/15/userphoto.aspx?size=S&accountname=username@teanntname.onmicrosoft.com
Do you get a different result?
UPDATE: In looking at the People Web Part and how it renders. Its actually render a base64 image in the actual HTML code. It is referencing an img file like I had suggested above. The above two urls will prove that your photo is not the same in two repositories. I'm intrigued by where the base64 image is sourced.