SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to display the Picture of Publishing Image field in my search results page. CQWP can easily display that image but Search Results web part gives error that "Property doesn't exist or is used in a manner inconsistent with schema settings."

After Googling for a while, I realized that Publishing Image is stored as HTML and SSP crawler just ignores HTML stuff in fields.

Has any body ever displayed the Publishing Images in Search Result?

share|improve this question

One way to do this is to create a separate field use an Event Handler to extract the image URL and store it separately against each page. The SharePoint search crawler can then be set up to index this additional field. The example below shows how you could do this with an additional text field called 'SearchImageUrl' in an SPItemEventReceiver that is attached to the Pages library:

public override void ItemUpdated(SPItemEventProperties properties)
    ImageFieldValue image = properties.ListItem["Rollup Image URL"] as ImageFieldValue;
    if (image != null && !string.IsNullOrEmpty(image.ImageUrl))
        properties.ListItem["SearchImageUrl"] = image.ImageUrl;

share|improve this answer
Ari, could you also set this in the AfterProperties of the ItemUpdating event? – Paul Lucas Aug 27 '10 at 2:07
Thanks, but this will not be feasible from maintenance point of view. I was looking for something without adding events or separate fields to copy the url. Thanks, anyway. – Namwar Rizvi Aug 27 '10 at 9:12
Paul - I haven't tried that scenario as when I have done this before I wanted the event to be asynchronous but that sounds plausible – Ari Bakker Aug 27 '10 at 11:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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