I am trying to retrieve the profile image with the _LThumb URL, in my people search result. But since my container is 30x30px, SharePoint is automatically retrieving the profile image with _MThumb on it. The image is a bit distorted this way and it is an issue on my clients end.

Is it possible to force the field to retrieve the image with LThumb URL so that the image will not be too distorted?

I have manipulated the XSLT of the search result and this is the field for the image:

<xsl:variable name="purl">
<xsl:call-template name="GetPicUrl">
<xsl:with-param name="PicUrl" select="pictureurl"/>
<xsl:with-param name="PlaceHolderUrl" select="'/_layouts/images/o14_person_placeholder_96.png'"/>

Here is the template:

<xsl:template name="GetPicUrl">
  <xsl:param name="PicUrl"/>
  <xsl:param name="PlaceHolderUrl"/>
    <xsl:when test="string-length($PicUrl) &lt; 1 or starts-with($PicUrl, 'file:') or starts-with($PicUrl, '\\') or starts-with($PicUrl, '//')">
      <xsl:value-of select="$PlaceHolderUrl"/>
      <xsl:value-of select="$PicUrl"/>

Also, Is it possible to retrieve the original image uploaded? Or a workaround so that during the upload it will also be saved? Can this be done without custom code?

Thank you in advance.

Your Answer

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

Browse other questions tagged or ask your own question.