forge

Getting an Image thumbnail from WSS 3.0

I recently needed to have thumbnails for some images that we uploaded to SharePoint for display in a thumbnail library.  I couldn’t find any documentation on how to get a thumbnail for an image.  So I fired up Fiddler opened up the script and figured out what the hundreds of lines of JavaScript was doing behind the scenes.

Basically, you take an append _t to the directory, convert the period in the file name to an underscore and append .JPG.  Here are a few examples:

Help Your SharePoint User
Image URL Thumbnail URL
http://server/site/web/PicLibrary/MyImage.gif http://server/site/web/PicLibrary/_t/MyImage_gif.jpg
http://server/PicLibrary/AnotherImage.jpg http://server/PicLibrary/_t/AnotherImage_jpg.jpg

Using a _w instead of a _t seems to give a slightly larger image.  This might be useful for hover over events.

2 replies
  1. Chris
    Chris says:

    Hi,
    I wisht to have a list that contains details about an item including a thumbnail of the picture attached to that item.
    How can I create thumbnails of attached pictures?
    Thanks
    Kind regards
    Chris

  2. Robert Bogue
    Robert Bogue says:

    I don’t know that this is possible. The functionality is actually implemented on the picture library. You could investigate adding the fields you want to a picture library and make the item the picture library itself.

Comments are closed.