Blog - Robert Bogue [MVP]
Rob's Notebook
Thor Projects LLC - Welcome

Getting an Image thumbnail from WSS 3.0

Posted by Robert L. Bogue on Wednesday, 23 May 2007 10:42 | 2 Comments | Professional

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:

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.

Comments

Monday, 15 Sep 2008 10:07 by Chris
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
Tuesday, 16 Sep 2008 02:00 by Robert Bogue
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.

Leave your own comment

Name

Url

Email

Comments