Showing current logged in user’s profile picture next to Welcome Menu in SharePoint 2013

Hi,

We recently got a requirement to show the logged in user’s profile picture along with the name on the Welcome Menu on the top right.

We followed these steps to implement it.

  1. Open the master page used by the Site (Site Settings àMaster Pages and page layouts à Select the master page file à right click and download a copy.
  2. Add the following tags in the master page.

<%@
Register
Tagprefix=”SPSWC”
Namespace=”Microsoft.SharePoint.Portal.WebControls”
Assembly=”Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”
%>

<SPSWC:ProfilePropertyLoader
runat=”server”
/>

<SPSWC:ProfilePropertyImage
PropertyName=”PictureUrl”
style=”float: left; height: 20px;
ShowPlaceholder=”true”
id=”PictureUrlImage”
runat=”server”/>

Saving and uploading the master page.

Hope it helps.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

5 thoughts on “Showing current logged in user’s profile picture next to Welcome Menu in SharePoint 2013”

  1. I added your code to my masterpage, but nothing is showing. What is the property of the “PictureUrl”? Where is it being called from? Did you implement this with AD? Seems like some steps are missing. I’d appreciate any help/clarity you can give.

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s