Monday, April 9, 2018

Display User Profile Picture in SharePoint 2013 Site

Get the URL from the current user's profile via REST, the image tag used to display when the src is updated:
/_api/sp.userprofiles.peoplemanager/getmyproperties endpoint which returns PersonalUrl property, user profile picture could be requested via _layouts/15/userphoto.aspx?size=&accountname= page, where

size - could be set to S/M/L which stands for Small/Medium/Large image size
accountname - user account name

example : [src='/_layouts/15/userphoto.aspx?size=L&accountname=username@contoso.com' ]

No comments:

Post a Comment

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.