SharePoint 2013 Image Carousel (Rotating Banner) using Content Search Web Part

SharePoint 2013 brought an excellent web part to get content from search index, called "Content search web part". Using content search web part, We can build a simple image rotator or content slider in few steps.
Content Search Web part is available only on SharePoint 2013 enterprise edition!

Step 1 -  Create a Picture Library and upload images:
Go to your SharePoint site, Create new picture library.
SharePoint 2013 Image Carousel using Content Search Web Part
 Give it a Name, Say "Slides"
 Upload required banner images to the library
Rotating Banner using Content Search Web Part
Step 2: Trigger Incremental Crawl:
Trigger an incremental crawl or wait for the incremental crawl schedule to complete, So that the picture library we created added to search index.

Step 3: Add Content Search Web Part to the page
Navigate to the page where you would like to add content slider, Click on Site settings gear >> Edit page >> On Insert tab, Click on Web part >> Under the content Rollup, select "Content Search" and then click on "Add" button.
SharePoint 2013 how to add content search web part
Now, the web part should look like the below image. Click on "Edit Web Part" from the web part menu, content search web part sharepoint 2013
Click on "Change Query" button from the web part properties pane.
sharepoint 2013 slider
 Select a query as: Pictures (system) and Restrict by app as : Specify a URL. In URL field, enter the URL of your picture library and Click on OK.
sharepoint 2013 slider web part

Now, in Edit Properties, Set the Number of items to show as per your requirement, and expand Display templates section. Set the Control template as :Slideshow and Item template as Large picture.
sharepoint 2013 content search web part display templates
That's all! Done, This is what we get in the page!
sharepoint 2013 carousel

How to link banner Images to URLs?

Well, what we've done above is just a slideshow. On clicking banner images, they take us to the individual image from the banner. However, We may have to link banners to different URLs. Say, on clicking the above "New markets"banner, you may want to send users to :http://your-sites/departments/new-markets/ isn't it? So what this step brings in addition is: When user clicks on the banner, where it should takes them, Lets head on to the next step:
SharePoint 2013 generates managed properties for site columns. If you add a column directly to a list, it will not generate a managed property automatically!

Step 1: Add new Site column and Include it to the library
We need a column to hold target URL (when banner is clicked!), So lets create a new site column and add it to the Slides picture library. The reason we create site column, rather adding coloumn to the list directly is: We need a Managed property! Fortunately, in SharePoint 2013, all site columns will be automatically created as managed properties!

Navigate to "site action >> Site settings >> Site columns >> Create new site column "TargetURL"
 content search web part sharepoint 2013 tutorial
Add site column to the Library:
Go to list settings >> Add from existing site column >> and choose the site column "TargetURL".
Once done, update TargetURL value for all banner images. sharepoint 2013 content slider
Once done, Initiate either incremental/full crawl - This will create a new crawled property as well as managed property for the custom site column we've added to the picture library.

Verify the managed property: Go to : Site setttings >> search schema >> Managed properties.

Make sure, you get the Managed property listed.
sharepoint 2013 content search webpart slideshow
Now, configure the managed property in the content search web part properties. Go to Edit page, Modify web part, And set the "Link URL" value to the managed property created from our custom column (TargetURL).
sharepoint 2013 content search web part picture url
That's all! Now the banner images will be pointing to the URLs specified in TargetURL column!


  1. Just created this week before and took one step further. Customized display control templates and item template. Looks fab. so happy with it :)

  2. what is the frequqncy fo crawl in sharepoint online E3, will it display immidetly!


    1. As per Microsoft KB:, Its targeted between 15 Minutes to 1 Hour! In Heavy usage environments, It can take up to 6 Hours!

  3. This is great!

    although it shows a shaded area at the bottom of the do you get rid of that?

  4. Great guide and it works perfectly!
    Like L Cook mentioned, is there anyway to remove the gray bar that displays the name/title of the picture?
    Also, the webpart is shrinking our pictures down. Manually setting the height and width of the webpart leave the pictures the same, smaller, size and just makes scroll bars with blank space. Any thoughts on this?

    1. Hi Alex,
      Did you get this to work?

  5. ¿How can I make the number of pictures to display dynamic? I want to display all the available pictures...

    By the way a very big THANK YOU!!

  6. Great Post.. Thank you!!!

  7. I waited for 1 week but still I am not seeing Target URL under Link URL in the Webpart configuration though the site was crawled ,I can See targetURLOWSTEXT under Managed Property,
    Thank you in advance and any help would be greatly appreciate.

  8. Hi , Nice Article, simple and great functionality from out of box feature.

    I am not getting TargetURL(TargetURLOWSTEXT) under the "Link" drop down in webpart though I see the TargetURL(TargetURLOWSTEXT) field in crawling /Manager property,
    any idea
    Thank you in advance

  9. Works like a charm, thanks for the blog...

  10. Sometimes the Managed property will not get made so just make it and map the crawled property, also try removing gaps if you have any in the name i.e Target link will be Targetlink... Hope that helps.

  11. Hi
    in this i need some changes.
    when click on image it open the new url in new window.
    other thing when you click navigation button below right its going to picture library.
    i want this should go to next and previous image.

  12. i need couple of changes.
    first when click on image it should open url in new window
    2nd thing navigation not moving back and forth its opening the picture library,

  13. navigation not working its opening picture library

  14. Hai first of all thank you for this nice post,here How can we increase the picture size??

    1. I would also like to know the answer to this, because currently the images are to small especially the width.

    2. I am having the same problem. Its not a banner as the Content Search Webpart is left aligned and I can not get it to center and the image is not scretched across the page even tho the image is 1500px x 300px. Anyone figured it out yet? it would really help me

  15. I have been working on this solution for about two months based on this blog and created the identical scenario. The managed property is still not populating under the "Link URL" when I edit the Content Search Web Part. All aspects o this appear to be set correctly, including reindexing the picture library, full crawl, incremental crawl, ensuring that managed properties have been mapped.

    I can't not seem to figure out what is wrong. It is an amazing tool and I would love to use this. Any help would be so very much appreciated.

  16. If you are not getting the TargetURL under the Link URL, try typing "TargetURLOWSTEXT" in the Link URL manually. It works for me this way. Hope this helps.

  17. I am not sure why I am not able to see anything after setting up the query. I have re-indexed the library. While changing query i see pictures names and path under query result but noting showing up.

    Do i need to enable any site feature before getting it configured?

    1. Run Search crawl (Indexing) once! Because, content search gets the data from Search index!

  18. Great Article It works perfectly fine for me

  19. Hi,

    Done everything as per the steps to start my banner. Search query is also resulting in some images as per the URL I am specifying. Re-indexing has also been done. Still images are not appearing in the webpart.

  20. Can you modify the interval time between slides? I'd like the slide images to change once a week.

  21. Hi,
    Very very helpful ! :)
    can you tell me how to display more than one image at startup?

  22. Sorry, all of my pictures don't appear, I only get a grey background with a "?"

  23. Links not working, on clicking it takes me to site pages library. Gone through all steps, no hiccups. Any suggestions?

  24. Please ignore my previous request for links. Its working now. My bad.

  25. Hello I got exactly the same issue...How did you solve it?

  26. When I click on the image I'm also directed to "Site Pages". Everything else works fine but this. Any suggestions would be appreciated.

  27. I want to have a simple Workflow to manage customer complaints: it's simple form that must undergo a Workflow
    can u help me pls ???


Please Login and comment to get your questions answered!

Powered by Blogger.