locked
User Profile Image accessed through ProfilePropertyImage does not display RRS feed

  • Question

  • Hi,

    I have a site on an internet zone which has page layouts with the SharePoint.Portal.WebControl of ProfilePropertyImage which displays the image from the user profile. When the site is accessed, the user profile photo does not display. The user does not seem to have rights to access the image from the MySite .However the user can log into the Mysite and see the profile picture.

    Can any one please adviceon why the image does not display? Any advice is greatly appreciated.

    Friday, May 25, 2012 4:38 PM

Answers

  • Looks like we are facing an issue outlined in the article  http://support.microsoft.com/kb/2532395 .

    Thursday, May 31, 2012 11:44 AM

All replies

  • Hi,

    If you have access to /SharedServicesPath/Person.aspx (i.e., http://<server-name>/<my>/Person.aspx), then you can you the ProfilePropertyImage to display image from the user profile.

    The probable reason why the user profile photo is not display in your case is because you might have not added the 'ProfilePropertyLoader' before using the 'ProfilePropertyImage'. 

    Try the following stub in your aspx markup and see if it helps:

    <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    
    <!– Required to pull properties from the User Profile –>
    <SPSWC:ProfilePropertyLoader runat=”server”/>
    
    <!– Show users image from UPS –>
    <SPSWC:ProfilePropertyImage runat=”server” ImageSize=”Large” ID=”Picture” PropertyName=”PictureUrl”></SPSWC:ProfilePropertyImage>

    P.S. : The ProfilePropertyLoader control works as the datasource and it needs to be added before using any other user profile property controls to display user profile properties.

    Hope this helps. Happy Coding!

    Regards,
    Devang Bhavsar

    Sunday, May 27, 2012 5:09 AM
  • Thank you Devang  for the reply but the ProfilePropertyloader is already a part of the code in the page.

    And also when the /SharedServicesPath/Person.aspx is tried out, the images is loaded but when we try our site, the image does not load

    Any thoughts ?

     

    Wednesday, May 30, 2012 11:18 AM
  • Could you please check the image property where it is trying to load?

    -

    Rao.

    Wednesday, May 30, 2012 1:03 PM
  • Hi FIM,

    When I add the control on default page, I use the following code, and the picture is display well.

    <WpNs3:ProfilePropertyImage PropertyName="PictureUrl" ResizeToFit="100" RenderWrapTable="True" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>

    When I add the control on AllItem.aspx of a list, the following code is also display well.

    <SPSWC:ProfilePropertyImage PropertyName="PictureUrl" ResizeToFit="100" RenderWrapTable="True" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>

    So, please check the  attribute of the control.

    Thanks,

    Jack


    Thursday, May 31, 2012 3:02 AM
    Moderator
  • Looks like we are facing an issue outlined in the article  http://support.microsoft.com/kb/2532395 .

    Thursday, May 31, 2012 11:44 AM
  • i am showing the Logged in User Information as shown in picture. but issue is that image is not getting fetched for first time. If i go to the 'My Profile' and return back then and only then image get displayed. How to solve this issue. I am getting User Information using Javascript. And also how to get Department for the logged in User.

    i used following control to show image

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

    i am doing this on Office 365 site.


    • Edited by NirajZ Friday, December 21, 2012 6:25 AM
    Friday, December 21, 2012 6:05 AM