SharePoint 2013 代码获取图片库中的大图、小图、原图

SharePoint 2013中,上传一张图片,除原图外,默认生成一张大图、一张小图,可以根据自己的需要将不同的图运用在不同的位置。

SPListItemCollection itemColl=GetPicLibraryItemColl();

SPWeb web = SPContext.Current.Web;
SPFile sf = spfolder.Files[0];
string folderUrl = sf.ParentFolder.Url;

string fileName = sf.Name;
int expIndex = fileName.LastIndexOf('.');
string subName = fileName.Substring(0, expIndex) + "_" + fileName.Substring(expIndex + 1) + ".jpg";
imageUrl = web.Url + "/" + folderUrl + "/_w/" + subName;       //大图地址
//imageUrl = web.Url + "/" + folderUrl + "/_t/" + subName;      //小图地址

//imageUrl = web.Url + "/" + sf.Url;                  //原图地址

原文地址:https://www.cnblogs.com/TroubleShooting/p/3967374.html