"The day you stop learning SharePoint is the day you stop using it."

Picture Library SlideShow Web Part not displaying image in original size

This is a known fact that out-of-the-box Picture Library SlideShow Web Part does not display the images in its original size. Further more, unfortunately it is not supported to configure in web part what image type (original, web or thumbnail) should be displayed in Slideshow.

The JavaScript code described below allows to display original images (without re-sizing) in Slideshow Web Part. In order to display original image the technique is to override the ShowPic function. For embedding JavaScript on page, use Content Editor web part (CEWP) on the same page where you have also inserted your SlideShow web part.

<script type="text/javascript">

function SlideshowObjectInitializer() {

  ShowPic = (function(ShowPicOrig) {
      return function() {

           var ssObj = arguments[0];  //SlideShow object
           var curPicIdx=ssObj.index; //current picture index

           ShowPicOrig.apply(this, arguments); //call original ShowPic

           //apply some changes to display original picture in SlideShow control
           ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
           //change picture & container size to auto instead of fixed (by default web image size is used)
             var cell = ssObj.cell; 
             cell.style.width = 'auto';
             cell.style.height = 'auto';
             cell.style.display = '';
             var pcell = ssObj.cell.parentNode; 
           pcell.style.width = 'auto';
             pcell.style.height = 'auto';


ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, 'imglib.js');
In the above given code you can adjust the size by modifying these lines/values:
The value '100%' can be changed to '90%' or '80%' and even in pixels you can mention the size, example:


Attached files in InfoPath are not indexed by SharePoint

This is a frequent and common question that every SharePoint/InfoPath developer come across at some point of time. The fact is attached files in InfoPath forms are not indexed. When you upload a file in an InfoPath form using the File Attachment control, InfoPath saves not only the binary data, but in a binary way extra information like name etc. When SharePoint Search is indexing, it finds the InfoPath xml file, it can read inside, but then the indexer finds a string of strange characters that the file attachment control has encoded and eventually the attached file content is not indexed.
The other work around would be to upload the file in a document library and providing the link in InfoPath form.
You may find some blog over web saying that SharePoint does index file attachments. But this is not true and not confirmed by Microsoft. But rather I have confirm from Microsoft experts that SharePoint does not indexes attachments in InfoPath form.

You may check this http://sharepointbeeeye.com/infopath-2010-a-better-file-attachment-solution/ article. It says it provides a better file attachment solution in InfoPath. I haven't tried this solution myself but you can try and let me know.

SharePoint-StackExchange Moderator

Author's Profile

My photo
A SharePoint Enthusiast working as a Project Lead for an IT Software & Consulting Company in Mumbai. I believe in giving back to the community through which I also learn and develop and eventually grow as an individual and professional. This blog is a small contribution to the community where I live in and may help someone who is seeking knowledge like me. Apart from being a SharePoint Enthusiasts, I am a husband, a father and a blogger. I love to travel and explore new landscapes and meet people of various culture. I am passionate about learning new technology trends in IT. I love spending time on my fitness and have a deep enthusiasm for urdu poetry and career counseling.

Popular Posts

Powered by Blogger.

Contact Form


Email *

Message *

Total Pageviews