No Thumbnails for Custom Picture Library Definition

I’ve got a Custom Picture Library definition – it encapsulates much of the same functionality I described a few days ago for Document Libraries. I built it, then ran Solution Generator against it to create the List definition and schema.

It all seemed to work alright, but when I tried uploading an image, it didn’t create my thumbnails, or the _w and _t folders the thumbnails are hidden in! This was a problem.

Well, I cracked open reflector (how did we do .NET development before it?) and dug around. Didn’t find much, except that the Upload.aspx page decides if it is for a Picture Library based on the List Template‘s Type attribute (ordinarily 109).

The Type attribute of a List Template tag says this:

Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.

This attribute corresponds to the Type attribute of the List element

Hmm. Interesting. I had changed my List Template‘s Type – I’ve been keeping all of mine unique in my solution, as I do have multiple lists based on the same out-of-box type (e.g. multiple lists based upon the ‘Custom List’ type). As I was suspicious, I changed this back to 109, and tried again. My thumbnails now worked.

I guess that this mean that the thumbnailing done during the upload process is contingent on the list’s Type being 109 still. As a consequence, I guess that a feature can only have one custom Picture Library definition (as “This identifier must be unique within the feature”).

Advertisements
No Thumbnails for Custom Picture Library Definition

8 thoughts on “No Thumbnails for Custom Picture Library Definition

  1. Hi,

    If you really want to you can create an event receiver and make the logic yourself of creating a thumbnail inside _w and _t.
    I have encountered this same problem a while back and this also works.

    Regards,
    Jeroen

    Like

  2. Hi Jeroen,

    Yup, that’s a good approach. I prototyped it a while back, and it worked okay. I’d just sooner avoid reinventing the wheel if I can. I’ll just use 109 for now!

    Like

  3. I did the same thing as you but when I remove the feature it messes up the ability of sharepoint to run the site manager saying feature xxx-xx-x-xx for list template 109 is not installed on this farm.

    Any thoughts about that issue?

    Error goes something like this: “Feature ‘bbc8d48a-6fe9-493d-a035-0f7cdfc1377f’ for list template ‘109’ is not installed in this farm. The operation could not be completed. at Microsoft.SharePoint.SPFeatureManager.GetFeatureRootAndListSchemaPaths(Guid featid, Int32 ltid, String& sPathToFeatureRoot, String& sPathToSchemaXml)”

    Like

  4. Jens says:

    Hi!

    I have this problem, and changing back to type=109 would do it. But what if you have a custom action in your picture library that you only want on your custom list defintion?
    Any ideas?

    Like

  5. Hmm. That’s a good question. It looks like it might not be possible as a CustomAction.

    I’d be delighted to hear if you find a solution, though.

    Like

  6. TiBo says:

    Hi,

    I’ve faced this problem after making my “Type” unique (10901).
    But changing Type from 109 to 10901 solved another problem : my picture lib isn’t in QuickLaunch any more, even if OnQuickLaunch is set to “TRUE”.

    Does someone reproduce this prolbem with a Custom Picture Lib of type 109 ?

    Thanks,

    TiBo.

    Like

  7. I got the same issue with my solution for storing product images. In my situation I had two list definitions of type 109 (Picture Library) in the same feature. This is a problem as types need to be unique per feature and I would like the thumbnail preview to work. I could create another feature, move the list definition to that feature, and set the type back to 109, but I am continuing to search for a solution that will cause it work in the current state.

    If anyone has any great ideas that might solve this issue please let me know. Thanks.

    Craig

    Like

  8. We’ve created a solution for extracting image metadata and creation of thumbnails in any kind of document library. Sells for 299$ per Farm and a free trial is available.

    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