Where a Picture Library Thumbnails stored?

I’ve been playing with Picture Libraries, and I began to wonder, where are the thumbnails stored?

Picture ListItems have 3 different sizes…

Thumbnails:

Thumbnails in a Picture Library

Previews:

Picture Preview Page

And the original image itself:

Original Image

Looking at the URLs for these image, the thumbnails seem to be under a hidden folder in the Picture Library called _t, and the previews are under _w . Looking at the Picture Library in SharePoint Designer, the images themselves seem to be related to each other by filename:

Sharepoint Designer view of a Picture LibrarySharepoint Designer view of a Picture Library 2

Looking at the file sizes, you can see a massive difference in the file sizes between the original and the thumbnail – 496k vs 5k, or about 1% the size.

Neat, simple. I’m not sure what it is generates the thumbnails, but they’re definitely done at upload, and it seems to make a pretty good job of it.

Of course, image files being stored in a document library don’t have thumbnails, so that won’t work so well if you’re wanting to display thumbnails in something like the Search Results.

Advertisements
Where a Picture Library Thumbnails stored?

10 thoughts on “Where a Picture Library Thumbnails stored?

  1. Peter says:

    Hi Andy

    I’ve been working on some Data Views that use the Picture library, but I can’t seem to find a way to show the thumbnails or the preview images. I can only get the full image. Do you perhaps have a workaround for this?

    Like

  2. Peter says:

    I figured it out. You need to build an XPath query that takes a substring-before() and a substring-after() and then concat() them to look like the URL of the thumbnails. It’s really easy, but it’s taken me all day to figure out.

    Like

  3. Hi Peter,

    Sorry, I’m away on training at the moment, but yes, what you’ve done is exactly what I’d’ve suggested, if there isn’t a suitable column with the thumbnail in it. It’s worth noting, if there is, it may be hidden.

    But otherwise, yes, you can construct the Thumbnail URL.

    Like

  4. Drasko says:

    And here is the XPATH:

    Just in case anyone else came here and does not have a day to spare.

    thanks guys this info was helpful

    Like

  5. Drasko says:

    ah my html was stripped:
    {@FileDirRef}/_t/{concat(substring-before(@FileLeafRef,concat(‘.’,@FileType)),’_’,@FileType,’.’,@FileType)}
    just put this in src attribute of img tag

    Like

  6. Brian says:

    Drasko,

    Can you elaborate a littel more on how to add this XPATH?

    I have a picture library I’m trying to use as the source for our images. I’ve created another .aspx page, inserted the data view web part and pointed it to the list with my photos.

    I’m in the common tasks area for the DVWP, and am trying to add a formula column with the code you’ve included above.

    Thanks,
    Brian

    Like

  7. Chris says:

    Drasko,

    Thanks for the XPATH, however it required some tweaking for me to work correctly.

    Here is what worked for me.

    /{@FileDirRef}/_t/{concat(substring-before(@FileLeafRef,’.’),’_’,@FileType,’.’,@FileType)}

    I had to add ‘/’ to the start then remove the second concatenation.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s