Tutorial: Render images in search results with FAST Search for SharePoint 2010

This walkthrough explains how to include preview images in search results in FAST Search for SharePoint 2010 (FS4SP). By default FS4SP will show image previews for content coming from a SharePoint picture library. If your images come from any other source they are simply listed as any other content.

We can render content in any way we want by modifying the XSLT stylesheet for the core results web part. Lets edit the style so JPG images include a preview. What we want is something like this:

1. On the search results page, click Edit Page

2. Click Edit Web Part on the Search Core Results web part

3. Click the XSL Editor button to edit the style sheet

4. Copy the stylesheet to your favorite text editor and make the following changes (marked in yellow). Download the full stylesheet here.


Comments (3)
  1. If you are talking about the screenshot of the XSLT where I refer to "changes are marked in yellow", you can download the entire XSLT and the changes are from line 290 to 316.

  2. Tim says:

    For some reason the images referring to the xslt don't show up in the browser, is there anything I can do to get a look at these?

  3. Rommel says:

    Hi Dan. Is there a way to render image using a the URL that is included in the raw xml result? For example I have a field called "PhotoUrl". Can I use the value of this field to display the image. "PhotoUrl" is a managed property from an Infopath Form.
    The scenario is we search for an InfoPath form that has an image attachment. The image attachment is then extracted to Picture library and then the direct link to the Picture in the picture library is stored on the "PhotoUrl" text box in the Infopath form.
    Thank you in advance

Comments are closed.

Skip to main content