2

I am uploading images to custom list, using CopyIntoItems, which has only one content type derived from Picture. Images are being uploaded successfully, however neither Thumbnail nor Preview are generated. I have tried the approach with invoking the /_t/pic_jpg.jpg URL but it's not working (gives me err. 404).

How to generate image thumbnails after programmatic upload?

  • If anyone need a workaround: creating an Item Added Event Receiver which sets properties.ListItem[SPBuiltInFieldId.AlternateThumbnailUrl] = (string)properties.ListItem.File.Item[SPBuiltInFieldId.EncodedAbsUrl] does the trick. – StaWho Sep 17 '13 at 9:04
1

Looking at the Picture content type it does not have an thumbnail preview column in the content type. The Image content type does have a thumbnail preview column. Try adding the Image content type to your library. It should generate the thumbnail preview for you.

  • I don't have 'Image' content type. Skimming through my farm with SharePoint Manager, I can see 'Thumbnail' and 'Preview' fields in 'Picture' content type. Can it be because I'm using WSS? – StaWho Sep 17 '13 at 8:04
  • Hmm that is weird. My Picture content type does not have thumbnail. Only preview and preview URL. Note sure about the difference. What Version are you running? I have MOSS 2013 15.0.4420.1017 – MonkeyWrench Sep 17 '13 at 21:46
  • I have WSS 2013 15.0.4420.1017 – StaWho Sep 18 '13 at 11:15
  • Sorry. I typed the wrong version. I am at 15.0.4517.1005. Maybe that is the reason for the discrepancy in our content types. Can you post your code? Maybe I can see how it works on my VM? – MonkeyWrench Sep 18 '13 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.