3

I'm using Promoted links Web part and i want to show a user picture on the background of the tile. How can i get the user picture? I'm trying to do this with no code.

The only way to add a picture is to use its url, but if he changes his profil pic the image will no longer exist... Do i have to upload the picture by myself somewhere? Or maybe upload it on sharepoint? But then whenever he changes his picture i will have to change it in my promoted links list too...

how can i achieve his?

11

By inspecting the source code i noticed the profile pic is set like this: background-image:url(/_layouts/15/userphoto.aspx?size=L&username=usernamehere);​

So I used the same url in my promoted links list and when ever a user change his profile picture the url is returning the right pic too.

Because of the cache files the changed pic can't be seen imediatly. So I need to clear it i want to see the new picture. But it works and it's a no code solution.

  • Looks like a very good solution. – Oak3 Nov 25 '15 at 12:42
  • The querystring-paremeter is not called username, it's called accountname. – Mx. Oct 13 '16 at 11:48
  • Cleared browser cache but still image is not updated, seems like sharepoint is having some other internal cache – codemirror Nov 7 '17 at 6:44
0

Without code, you won't fix the issue on the changing profile picture. With code, you could solve this with https://msdn.microsoft.com/en-us/library/office/jj920104.aspx

You could also think about using a content by search webpart to show people and pictures and somehow filter the result to get the same people.

  • Can't we use a script editor? And load all the pictures? but then i don't know how to set the picture in the right tile – Tanaka Nov 20 '15 at 12:43
  • Yes, you could use the script editor.And you need to have a key like email address or username in the tile to set the picture. – Oak3 Nov 23 '15 at 10: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.