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

Automatic Thumbnail generation in SharePoint

We’ve got a customer doing a very common thing – and to my surprise, the user experience in SharePoint is pretty frustrating.

The customer has a number of publishing pages, with Images at full size and thumbnail size (for roll-up). So far, so standard. What they’d like, though, is the automatic thumbnailing of images when they’re uploaded to SharePoint. “Easy” I thought. Wrong! Continue reading “Automatic Thumbnail generation in SharePoint”

Automatic Thumbnail generation in SharePoint