Scenario:
While working with picture library we often need Thumbnails for display purpose.
Also depending upon you are accessing it in XSLT or C# code, you need the proper Url to the SharePoint generated thumbnail url.
Solution:
Small snippet here has it
Code:
<a href="{@EncodedAbsUrl}"><img border="0" src="{@EncodedAbsThumbnailUrl}"/></a>
SPListItem["EncodedAbsUrl"]
or
SPListItem["EncodedAbsThumbnailUrl"]
SPListItem[SPBuildInFieldId.EncodedAbsUrl]
or
SPListItem[SPBuildInFieldId.EncodedAbsThumbnailUrl]
2 comments:
Could you please add some c# code that shows how to get the the thumbsnails from a Picture Library?
Best gards,
John
Hi John
Check line 4-5 and 7-8 , I do have the code to read the thumbnail url
Post a Comment