I'm searching for a way to have a task list view where AssignedTo column contains user profile image just as i can in User Info List.

By looking at hows its done in User Info List, i see a PictureDisp calculated column with custom DisplayPattern that renders the image. This is schema for the field:

<?xml version="1.0" encoding="utf-16"?>
<Field ID="{cd01f312-731b-4711-97f8-a18c37b1eeb5}" Type="Computed" ReadOnly="TRUE" Name="PictureDisp" DisplayName="Attēls" Sortable="FALSE" Filterable="FALSE" EnableLookup="FALSE" Hidden="TRUE" AuthoringInfo="(attēls)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="PictureDisp">
    <FieldRef Name="Title" />
    <FieldRef Name="Picture" />
    <HTML><![CDATA[<a ONCLICK="GoToLink(this);return false;" href="]]></HTML>
    <URL />
    <HTML><![CDATA[<IMG width="62" height="62" border="0" SRC="]]></HTML>
        <Column Name="Picture" />
      <Case Value="">
        <HTML><![CDATA[/_layouts/images/person.gif" ALT="]]></HTML>
        <HTML HTMLEncode="TRUE">Attēla vietturis:</HTML>
        <HTML><![CDATA[ ]]></HTML>
        <Column Name="Title" HTMLEncode="TRUE" />
        <HTML><![CDATA[ " > ]]></HTML>
        <Column Name="Picture" HTMLEncode="TRUE" />
        <HTML><![CDATA[" ALT="]]></HTML>
        <HTML HTMLEncode="TRUE">Attēls:</HTML>
        <HTML><![CDATA[ ]]></HTML>
        <Column Name="Title" HTMLEncode="TRUE" />

So it uses the "Picture" column to get the value of user profile picture URL to render the image.

Obviously, for a task list i don't have a "Picture" column. Is there any way i can make for a task list a PictureDisp field with custom DisplayPattern and lookup that information from Site User Info List?


If you add a column of type Person or Group, you get the option to add the column Name (with picture).

If you check the fields feature in the 14 hive, there is a property on the Field definition called ShowField:

<Field ID="{078B9DBA-EB8C-4ec5-BFDD-8D220A3FCC5D}" 

If you have a User type field with Showfield="NameWithPicture" you should get the users picture. Is this sufficient, or is it a problem that you get the name as well?

  • Thank you, i'll take a look at this. And having a name is no problem, i need that too. And anyway I suspect if you change ShowField to "PictureDisp" it will only show picture. By the way for WSS3 i have only a 12 hive :) – Janis Veinbergs Jan 13 '12 at 16:11
  • Thank you, this works. I actually modified existing AssignedTo field and set ShowField="NameWithPicture" to make it work. Thank you for solution. However if i choose to add a new field with similar schema and a FieldRef attribute, it won't show picture, but i can choose to show simple text fields like email, etc. – Janis Veinbergs Jan 17 '12 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.