Skip to end of metadata
Go to start of metadata

Total Estimated Cost: $?? CDN - Contribute

note: this functionality is now available in core

Problem to be solved

Better personalisation features. Each user should be able to upload a picture of themselves to be presented at the profile page. If no picture is uploaded a blank picture should be presented.

Picture should to be cropped to a certain aspect ratio - 3:4 could work fine, then picture at the profile page could be displayes as e.g. 120 x 160 px and in the forums as 60 x 80 px.

possible future additions

  • adding a selection of avatars to be used if no picture is uploaded.
  • No labels

19 Comments

  1. Anonymous

    This should be fairly straight forward.

    Avatars to be stored the content/avator/ directory.

    Include one default non-gender specific avitar so users are not forced to choose one or the other if they do not include one of their own.

    What do you mean by cutom field? 




  2. Anonymous

    Potentiall allow admins to add new avatars something like course icons are made available. Manualy upload images, and have the avatar picker automatically list them.

  3. I don't see implementing both ways. Either we provide a large set of cute icons to choose from or we provide one, but allow users to upload their own.

    The site of the image would depend on where it gets used. If it's in the forum then 80x80 should be the max, otherwise for the profile page 100x100+ would be fine.

    Managing the avatar will have to be added to the admin edit user page.

  4. just a small comment: avatars should probably not be square (say 80 x 80) but a different aspect ratio, say 80 x 100 - as this is more like the shape of a human face (smile)

    custom field: haven't had any chance to think more about this, or how / if to implement it, but at times we have wished to add custom information to users profile pages. at one course this could be their location, for others what countries / institutions they work in / with, for others which organisations they belong to etc. bear in mind that we do not work in a university setting where user information is static..

    what I really would like, I think, is a possibility as an administrator to select (and add / deselect) which fields the user profile page has, and which of these fields to display at the public profile pages. but have no idea how this could be implemented, and haven't thought much about it.

  5. Anonymous

    Custom Fields:
    An admin option to specify fields is already in the issue tracker, I think. It is very much a feature we want to implement. The same with letting students pick and choose which of the available fields they want to make public to a) other students, or b) the instructor, or some combination. In general, a more fine grained way of controlling who sees what.

    Avatar Size:
    When I mentioned 100x100, I really meant max(height, width) of 100. Images would not be cropped, just resized to fit. As for the 80x80 that would be a cropped small version for the forum. But, either way is fine with me. Some like big avatars on forums, some do not.

    Perhaps we can agree to let the sys admin specify the height and width they want and whether images should be resized or cropped. We have to agree on a good default value though. (Allowing the admin to specify the size, makes it difficult to include one or more default avatars to use).

  6. Anonymous

    Will need to add a check in the installer to see if GD support is enabled. Will we want to support netpbm? (I think no).

    If GD is not installed, should avatar support be disabled? Allowing small images to be uploaded w/o going through the regular resize means that we're pretty much implementing two features and may not be worth the trouble.

    GD is available in most PHP installations.

  7. Anonymous

    Also, I assume support for GIF, JPEG and PNG, but don't see a problem with supporting BMP file formats as well (or really any format GD supports).

  8. I'm having second thoughts about the avatars, they are just not neccessary at this time, and maybe never? the importaint part is to have the possibility to upload a picture. have updated the wiki page regarding this.

    regarding pictures, what I mean is that the aspect ratio that is decided upon should not be 1:1, but rather 3:4 or similar, as this resemble a human face more correctly.

    regarding cropping & resizing. cropping to an aspect ratio might in some cases cause you to crop out "importaint" parts of the picture, on the other hand, resizing a picture to fit a certain height / width if the picture does not have the requested aspect ratio will cause the picture to be stretched in unnatural ways. the forums at atutor.ca just did this as my picture was ~3:4, but displayed as 1:1 - causing my face to look very fat, mangled and strange (smile)

    as a simple alternative you could use HTML set width but not height. having a constant width displayed is more importaint than a constant height from a design / UI perspective.

  9. "In general, a more fine grained way of controlling who sees what."

    this pretty much sums up what I ment with custom fields. it should probably be described as a project on it's own, not related to the profile pictures, so I edited it out from the wiki.

  10. Anonymous

    Resizing would not alter the aspect ratio.

    Let me suggest this:
    1. Users can upload a single image up to 800KB in size.

    2. The uploaded image is resized to a max(height, width) of 100px (doesn't change the aspect ratio).

    3. The resized image (aka thumbnail) appears on the profile page and in the forum, and inbox, and possibly other places.

    4. The thumbnail on the profile page will be a link to the full size original image.

    5. If there is no profile image then an empty 100x100px box will be displayed instead with the alt/title text saying something like "no profile picture available".

    100x100 is debatable and if used in the forum, something like 80x80 (or slightly smaller) might be nicer.

  11. I might be very slow today, but I do not see how setting a fixed 100 x 100 px does not change the aspect ratio of a picture? 100x100 / 80x80 / 137x137 is 1:1 and if the picture factual size is 100x150 (aspect 2:3) resizing it to 100x100 (aspect 1:1) does change this ratio.

    I've attached two comparisons to illustrate what I mean. now, you may argue that this is details, but then again, beauty / ugliness lies in the details (smile)

  12. Anonymous

    Vegard, when I say 100x100 I mean a max(height, width) of 100.
    If the image is 200 x 50 then it will be resized to 100 x 25, still the same aspect.
    If the image is 50 x 200 then it will be resized to 25 x 100, again, same aspect.

    If the image is 20 x 40 then it will not be resized.

    No worries, I understand your concern.

    Images will be resized and preserve their aspect ratio. Images will not be cropped in any way.

    (smile)

  13. good, I am convinced! I agree to all other parts in your suggested solution.

    the reason for my concern is that you are displaying all pictures at atutor.ca as 70 x 70 / 1:1 regardless of their original aspect ratio, and solutions on atutor.ca have a tendency to be duplicated in Atutor.

    maybe though, if an image is less than 100px wide (or whatever is decided) this should actually be sized up to keep things consistent UI-wise..?

  14. I cannot comment on what was implemented on atutor.ca

    I'm not sure if up-sizing smaller images is appropriate. Especially if it is an animated GIF (it would lose the animation).

    Additionally, the upload will not be available on the Registration page, for simplicity. Users can upload a profile image on their Profile page only. Admins will be given the upload image option on the user create and edit pages.

    The use of the profile image would be implemented in such a way as to make it easy for any module to make use of it. Therefore, module specific sizing will not be implemented. Forums will have to use the same thumbnail that is used throughout.

  15. Another note on the requirements of GD, GIF support is only available in 4.3.9+/5.0.1+. So although we say GIF support, it may not be available on all installations.

    Also, JPGs will be saved at 75% quality for the thumbnails to save space. In some extreme cases the thumbnail may actually be larger than the original.

  16. URLs to the profile images will actually include a PHP script similar to the get.php file.

    I'm thinking something like profile_img.php?id=

    Unknown macro: {member_id}

    The script will have to send the correct MIME type as well.

  17. not sure what that unknown macro is all about, but ignore it.

    should look like: profile_img.php?id=MEMBER_ID

  18. "The use of the profile image would be implemented in such a way as to make it easy for any module to make use of it. Therefore, module specific sizing will not be implemented. Forums will have to use the same thumbnail that is used throughout."

    it is probably a good idea to only operate with one (factual) thumbnail size, but you can / should still size it down for forums and other tools by altering the templates slightly, say adding a width="80" to <img src="profile_img.php?id=MEMBER_ID" /> in the forum templates and so on.

    Additionally, the upload will not be available on the Registration page, for simplicity. Users can upload a profile image on their Profile page only. Admins will be given the upload image option on the user create and edit pages.

    agreed.  

  19. In the past I have created a forum with place for a 100x100 profile image and it looked fine. It creates a nice column on the left side where the edit/delete and other meta data is placed. It actually looks very nice.

    So, I think 100x100 in the forum will not be an issue.