request Gravatar images in required size

Issue #1940 open
Robert Jäschke created an issue

On /bibtex pages, the user's profile image is shown in a square with an edge length of 64px. However, the image we request from Gravatar is of size 128px (the URL is something like http://www.gravatar.com/avatar/HASH.jpg?d=mm&s=128). Since on the CV page we need the other size, it would make sense to allow a parameter for http://www.bibsonomy.org/picture/user/USER which allows to select the size. For Gravatar images, we can then just pass-through the requested size. For local images, however, we would need to compute and/or store the image in the other size. The solution for that problem needs some discussion.

Comments (11)

  1. Thomas Niebler

    Because the Gravatar resizing actually returns a resized image, the CSS width attribute only tells the browser to show the same image in a smaller form, but you still need to transfer the whole image. This is basically a bandwith issue, as I see it.

  2. Daniel Zoller

    I would recalculate all existing pictures to the new size and store new uploaded images in the two required sizes, because scaling images on-the-fly may take too long.

  3. Thomas Niebler

    @tcunis Please find out which picture sizes are needed and adapt the PictureUploadController and all other classes accordingly.

  4. Former user Account Deleted

    this implementation currently supports 66px (Post), 100px (CV), ad 200px (Default). The call is

    #!
    /picture/user/USER?size=SIZE
    

    where SIZE may be either the size in pixel (either w/ or w/o 'px') or 'cv', 'post', or 'default' (case doesn't matter). I.e.:

    #!
    /picture/user/USER?size=100
    /picture/user/USER?size=200px
    /picture/user/USER?size=POST
    
  5. Log in to comment