1,804 articles and 15,666 comments as of Tuesday, December 28th, 2010

Tuesday, February 12, 2008

EndUserSharePoint.com: Default image sizes in SharePoint

Doug from California writes:

We noticed an issue with SharePoint. We created a meeting workspace and then added a Contact Details webpart to the site page.

  1. When we modify any webpart on the page the image will resize itself on its own.
  2. To fix, we simply move the appearance position of the image to left/right and the image will resize back to normal.

If they are using a large image for their profile, this will happen. I’ve had the same problem in my environment and we are controlling the images with a 400×400 image. I can also get the problem on occassion when I perform a people search. I honestly don’t know if this is a SharePoint bug or an IE bug. I think SharePoint attempts to resize the image internally before displaying it in some places, but in others it tries to allow IE to resize the image.

I suggest that each user’s picture be no more than 200×200. The actual size of the profile picture is 72×72 and when it is rendered in a person column using the picture format, it is 62×62. I think the contact web part is the same, 62×62.

I know that’s a lot of details, but I’m in the process of writing a add-in for SharePoint that retrieves our employee’s images from a database. I’ve been trying to find the best size to use — so that’s why I’ve learned so much about profile pictures! — Chris

 

 

Please Join the Discussion

13 Responses to “EndUserSharePoint.com: Default image sizes in SharePoint”
  1. Mike says:

    We have the same problems with clients and reproduced it in our plain vanilla environment. Since it appears randomly I believe it is a (strange) bug. Personally I think wether it is MOSS or IE doesn’t really matter, since MOSS is relaying on it, it’s a bug in the MOSS solution, imho. It seems that having the correct(!) size doesn’t solve the problem either, we’ve seen long strected 72×72 images in the people search results.

  2. Jules says:

    Yeah

    Our SharePoint Profile Pics seem to be pretty Random, as to whether they get displayed or not !
    They all display OK on their own MySite Details. We have checked all the dimensions as well, no obvious clue as to why some would display and other don’t.

    Microsoft do not seem to be porvding much help on this issue. Rather poor support, to what seems to be a Bug in MOSS.

  3. Mike says:

    And to make it even more sad.. It’s not solved with the comming of SP1 :(

  4. Schau says:

    Hi guys,

    The optimal solution is to scale down the pictures, but this procedure will also do the trick.
    1.) Perform the people search like normal which will take you to the
    peopleresults.aspx page.
    2.) Site Actions/Edit Page.
    3.) Click edit on the People Search Core Results web part.
    4.) Click on XSL editor.
    5.) Make a backup copy of everything in the Text Entry –Webpage Dialog that
    appears in a notepad document for safekeeping.
    6.) Look for the following line=>
    window.setTimeout(”resizeProfileImage(”)”,1)
    7.) Change the second to last character from 1 to 500 which is the number of ms.
    Should now look like window.setTimeout(”resizeProfileImage(”)”,500). Change nothing else, just this value.
    8.) Click Save. Then ensure that you hit Apply and OK.
    9.) Test these settings in a browser. You may need to reset the cache or possibly
    an iisreset. To ensure the browser is using the new settings, view source on the
    peopleresults.aspx page. Starting at the bottom of the page search upward until you
    see the above function (i.e. window.setTimeout) and ensure the last parameter is
    set to 500.

  5. Mark Miller says:

    Michael – Thanks for the addition to the post. Can you explain to us what this is doing and how window.setTimeout relates to image size? — Mark

  6. Schau says:

    resizeProfileImage is a Javascript on the the search result aspx page.
    By default it is resizing to 75×75. You can also set your own size using resizeProfileImageCore(objid, maxwidth, maxheight).
    The setTimeout delays the execution of the image resize by half a second. You can increase it if it isn’t enough, but then i would suggest scaling down the images.

    /Schau

  7. Burke says:

    Thank you so much for the XSL fix. I had a problem with images not getting resized in search results and it was driving me nuts. I had to crank mine up to 75, but it works now.

  8. Aterese says:

    Schau thanks so much, that timeout changed worked a treat. Slight flash as it resizes, but never leaves them odd enlarge sizes anymore :)

  9. Kevin says:

    Thanks for the fix, that did the trick for me as well!

  10. Gaurav Matkar says:

    we have uploaded a users image in mysite,but users imgae is not available in Contact Details.Any Clue??

    Thanks

  11. Toby says:

    I also have the image resizing problem, but it’s on a “list view” of employees details. I tried to follow the advice from Schau, by accessing the xls editor, but it doesnt exist in a list view. Any idea how I can get round this ?

  12. Yash Dogra says:

    Users profile picture elongated on search results but if they refresh the page or clears browser cache the pictures are normal. We just have installed sp2 and this issue is appearing all over.Is this just a browser issue or sp2 or ie6 issue or can something be done to stop this from happening. I have had a few complaints from maximum users regarding this issue.I am not able to undertstand why is this happening.

    Please help with the cause and solution !!!!!!!!!!!!!!!!!!!!!!!!!

  13. Yash Dogra says:

    In sharepoint , Users profile picture elongated on search results but if they refresh the page or clears browser cache the pictures are normal. We just have installed sp2 and this issue is appearing all over.Is this just a browser issue or sp2 or ie6 issue or can something be done to stop this from happening. I have had a few complaints from maximum users regarding this issue.I am not able to undertstand why is this happening.

    Please help with the cause and solution !!!!!!!!!!!!!!!!!!!!!!!!!


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!