0

I am creating a "list of content" site and use Rest API as a data source.

The query: https://sharepoint/_api/search/query?querytext='contentclass:sts_site'

works fine and I am able to get Title and Path for each site. There is also a field "PictureThumbnailURL" for each site and it always has Null value.

Where do I need to put an image so when I query the site as above, it returns this image?

Update: I changed the query to operate on sts_web. PictureThumbnailURL can be found in Central Admin - Manage service applications - Search Service Application - Search Schema - Managed Properties. I tried add a new crawled property in PowerShell:

$web = Get-SPWeb https://sharepoint
$web.AllProperties["MyThumbnail"] = "http://url.to.thumbnail.jpg"
$web.IndexedPropertyKeys.Add("MyThumbnail")
$web.Update()

and: a) map it to PictureThumbnailUrl Managed Property b) create a new Managed Property and map the above then did the full crawl.

Unfortunatelly, neither of this worked. The search result does not contain the new property and PictureThumbnailUrl is still null.

I followed the steps from here: https://nettitude.wordpress.com/2013/10/17/introducing-indexed-property-bag-in-sharepoint-2013-a-searchable-collection-of-properties/

I also tried $site.Properties, $site.AllProperties and $web.Properties but still none of my data is displayed in the search results.

0

2 Answers 2

2

You can set your logo managed property any way you like. In my case I have a special site catalog content type that stores my site info (way easier than using the property bag). What I think you are missing is that the site "preview" is a live view of the site home page in an iFrame. In my case I modified the out of the box Item_Picture display template and assigned it to my content type. Then I override the picture thumbnail and used my custom managed property to show my logo.

0

Use the 'SiteLogo' property to get the site's logo. You can also limit the number of properties returned by using the following

selectproperties='Path,Title,SiteLogo'
1
  • If this is the logo which is set in "Site Settings" - "Title, description, and logo", then it is reserved by the company logo. Besides, as far as I understand, the thumbnail would then be visible in the left, top corner in each site which is not a good idea.
    – tsap
    Apr 5, 2016 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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