0

how can I get the Large Thumbnail of user picture,because by debaut it give the Medium:

$().SPServices({
        operation: "GetUserProfileByName",
        async: false,
        webURL: _spPageContextInfo.webAbsoluteUrl,
        AccountName: currentUser.Name,
        completefunc: function (xData, Status) {
            //Fetch result and insert items to the array of badges
            currentUserInfo.photo=getUPValue(xData.responseXML, "PictureURL");

        }
    });

give the Medium

as default

  • have you got it working? is given answer helps you in it? – Hardik May 26 '16 at 12:35
  • yes it works , other solution is to modify the url and change M_thumbnail to L_.. – Imen Turki May 26 '16 at 16:33
  • Yes that will also work. But I think this is the pre-defined SharePoint column to get original Picture's URL. Can you please upvote the answer as well? – Hardik May 26 '16 at 16:43
  • Yes with pleasure – Imen Turki May 26 '16 at 17:16
1

Please use below line to get original size picture.

currentUserInfo.photo=getUPValue(xData.responseXML, "ows_EncodedAbsUrl");

Instead of

currentUserInfo.photo=getUPValue(xData.responseXML, "PictureURL");

This ows_EncodedAbsUrl will give you the original picture's URL.

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.