how to display images

Sep 22, 2011 at 3:25 PM

Hi

How can I display images from a folder as we dont have images on AD ?

I added /photos/{LOGIN}.jpg literally to the 'Format of url of photos users' but an error results.

Error: FillUserList error - Index was outside the bounds of the array

I havent created the folder photos, do i need to do this  ?



 



Sep 26, 2011 at 10:23 AM

Hi,

The error only occurs when you specify value ​​for parameter "Format of url of photos users" or not?

What is your value of parameter "AD user property attributes for user list"?

Have you checked the parameter "Show the user photo"?

Oct 26, 2011 at 5:38 PM

Hi,

I need a help with Images display?

I am getting a same error Error: FillUserList error - Index was outside the bounds of the array - and this happen when [user_account] parametr is empty or Null.

and it occurs when I specify value for "Format of url of photos users" - /photos/{LOGIN}.jpg

What is your value of parameter "AD user property attributes for user list"? it set to: "sn,givenName,title,department,telephoneNumber,physicalDeliveryOfficeName,mail"

Have you checked the parameter "Show the user photo"? Yes

Where do I need create photos folder? in document library sharePoint?

Thank you

Oct 26, 2011 at 7:27 PM

Please describe in more detail what was meant by "and this happen when [user_account] parametr is empty or Null".
Is user info page displayed, when you are clicked on user in the mode without displaying photos?

My guess - in your domain, value of AD-attribute "userPrincipalName" is empty for users.
Is this true?

Oct 27, 2011 at 8:52 PM

Hi

I remember having this problem and there was a problem with AD missing some attributes also.

Oct 27, 2011 at 9:27 PM
Edited Oct 27, 2011 at 9:31 PM

We solved this problem with Marina by email.

The problem was with the accounts that have empty values of ​​attribute "userPrincipalName".

Tomorrow I'll release a new version of web part.

Oct 28, 2011 at 6:09 PM
Edited Oct 28, 2011 at 6:11 PM

Hi

I had a problem with the pop-up box, on some accounts I recieved errors but everything else worked. So I disabled the pop-up box by removing the url in the webpart attributes.

Will this be fixed in the new version?

Also, the numbers for page navigations are a little small any chance of enlarging these, its difficult to see which page is active.

Thanks

Oct 28, 2011 at 6:59 PM

Hi,

The new version of the UsersADBrowser is already released.

In this version was modified method to display user card. Now uses attribute "sAMAccountName" instead of used attribute "userPrincipalName".
Since in some configurations, AD-attribute "userPrincipalName" can be empty.

 Display style of page numbers you can change by yourself.
 Locate in the template Browser.ascx ASP.NET tag
 <PagerStyle Mode="NumericPages" PageButtonCount="10" />
 and you can simply specify your CSS-class (add attribute CssClass in PagerStyle tag):
CssClass="your_large_font_css_classname"

Jan 11, 2012 at 11:33 AM

Hi,
how to show user photo from AD (thumbnailPhoto)?

Jan 11, 2012 at 1:51 PM

Hi,

This feature (retrieve images from AD) is not implemented, because the requests for retrieve images from AD will degrade performance of the AD-controller (if this done in real time).

In the current version, to display the photos you need to use the attribute "Format of url of photos users" in the settings of the Web Part. You can specify any address in this attribute (for example for static images in document library - "/Photos/{LOGIN}.jpg"). Also you can specify the url of script (for example "/_layouts/MyCustomScriptForPhoto.aspx?login={LOGIN}"). 

But I do not recommend solution with dynamically getting images from AD for performance reasons. Better choice is to prepare a document library with all the photos. Btw, SharePoint Server 2010 (only Server, not Foundation) uses separate  image library on the personal site collection (this library is named "User Photos").

Jan 13, 2012 at 9:55 AM

Thanks for your answer. I found another way to display user photos from active directory:

  • I just synchronize AD with Sharepoint Profiles
  • In UserADBrowser tool I reference to the synchronized photos which resides in a document library in MySite site collection
  • For me, the url to the photos is:  /<MySite-site collection path>/User%20Photos/Profile%20Pictures/<myDomain>_{LOGIN}_MThumb.jpg
Oct 24, 2012 at 3:15 AM

Hi Uschimi,

Could you elaborate and assist me in replicating your configuration? 

  1. I was able to successfully synchronization SP with AD, as per the following blog:

    http://blogs.technet.com/b/nishants/archive/2012/02/21/how-to-sync-picture-from-sharepoint-to-active-directory-and-hence-to-outlook-and-lync.aspx
  2. The URL to our mysite is http://mysite.xyz.com, so what is the URL I would enter for the "Format of URL of photos users" field within the webpart?  The USERSADBrowser webpart is currently mounted in the intranet site http://intranet.xyz.com

 

Thanks,

J

 

 

 

 

Jun 11, 2013 at 10:45 AM
Hi,
sorry for my question but I'm not expert in Sharepoint and I can't display photos on UsersADBrowser WebPart. I have sharepoint 2013 foundation.
I did:
  1. add Images Library on my site (the same I added UsersADBrowser WebPart) and give it name Photos
  2. upload some jpg files with %username%.jpg names
  3. in UsersADBrowser WebPart settings I checked "Show the user photo" and put /Photos/{LOGIN}.jpg as a Format of url of photos users
I have no errors but all people have default person.png image as a Photo. Could you explain how to show the photos in simply words :)

Thanks
michszym
Jun 11, 2013 at 4:50 PM
Hi,
  1. What browser do you use?
  2. Try to view source code of page (right click and select "view source" option and find img src attribute with user photo or press key F12 in IE and select user photo)
  3. Is these image exist to the specified path? Simply copy and paste path value of img src attribute in address bar of your browser.
Jun 12, 2013 at 8:25 AM
Hi,
thanks for your answer,
I'm using IE10.
Ok I found my mistake - I should to put path like this /subsite/photos/{LOGIN}.jpg - before I tried: /photos/{LOGIN}.jpg

Once again thanks for your help.
Mar 14, 2014 at 3:36 PM
Hi, We just started using this product for a staff directory, It works great for the users, but we have several manufacturing associates that do not have Active directory user credentials. We have been able to list the users by adding these staff as contacts. But because they have no login- we cant display any pictures for these folks. Pictures are loading fine for the AD users. Can you point us in the right direction to get photo's for our contact OU staff?

Thanks
Mar 19, 2014 at 4:56 PM
Hello,
thank you for this great solution. I just want to tell you that I uses the thumbnailphoto attribute to import the photos, how?

Photos are well imported into Sharepoint, so I used MySite path of a user, & just replaced his login name with {LOGIN}


for example: /PORTAL/MY/User%20Photos/Profile%20Pictures/<myDomain>_{LOGIN}_MThumb.jpg

Perfect, I m willing to help anyone in this>
Mar 19, 2014 at 5:31 PM
Thanks. The contacts do not have login rights. So are you saying i n the attributes of the contact. I use the word LOGIN for all the folks set up as contacts.

Sent from my Verizon Wireless 4G LTE DROID


JKarhani <[email removed]> wrote:

From: JKarhani

Hello,
thank you for this great solution. I just want to tell you that I uses the thumbnailphoto attribute to import the photos, how?

Photos are well imported into Sharepoint, so I used MySite path of a user, & just replaced his login name with {LOGIN}


for example: /PORTAL/MY/User%20Photos/Profile%20Pictures/<myDomain>_{LOGIN}_MThumb.jpg

Perfect, I m willing to help anyone in this>
Mar 19, 2014 at 5:38 PM

Please tell me what you trying to do 1st. You have imported the photos for your People from Active directory with the thumbnail attrubute right?
If so,send me one photo link example & i'll tell you how to modify it.

sent from mobile

Mar 19, 2014 at 7:00 PM
Mar 19, 2014 at 7:02 PM
Edited Mar 19, 2014 at 7:16 PM
This is the path for the default blank photo . Get any user photo from his MySite & put it here.
Mar 19, 2014 at 7:09 PM

Where do I find : MySite path of a user?

Mar 19, 2014 at 7:16 PM
Edited Mar 19, 2014 at 7:16 PM