When using the Facebook auto-imported avatar in Drupal profiles, the avatar does not scale, crop, or otherwise shrink to comply with the setting in the Administer -> User Management -> User Settings -> Picture Maximum Dimensions. This means that all users with standard pictures may have one size avatar, while all facebook connect users are inadvertently allowed to have larger avatars. This plays havoc with theming, not to mention ego's.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | fbconnect-470702.patch | 1.57 KB | Gekiboy |
| #5 | fbconnect-470702.patch | 1.57 KB | Gekiboy |
Comments
Comment #1
tsi commentedTrue, subscribing
Comment #2
LaNets commentedComment #3
tsi commentedI think now it is worse because the images are getting cropped instead of being scaled.
I now have a user that got her head cut out of the picture.
Comment #4
tsi commentedI changed line 482 to :
image_scale($file, $dest, $width, $height);and I think its working better now.
Comment #5
Gekiboy commentedThere's still an issue where the module will try to upscale the images if the profile picture dimensions are larger than the image retrieved from facebook. I've put together a patch to fix this issue. Please review and let me know what you think.
Comment #6
Gekiboy commentedComment #7
Gekiboy commentedI've updated my patch to work with the latest snapshot.
Comment #8
hankpalan.com commentedWhich profile picture is it pulling from Facebook. The one on my profile page is 200px wide, but I think its pulling the 50x50 cropped and scaled picture used for all the comments. Is there anyway to have it pull the larger picture and since I'm using imagecache to scale my profile pics it would all work perfectly.
Or is there no option with the FB API to grab a different profile pic?
Comment #9
hankpalan.com commentedIs this code taking the profile picture from Facebook and resizing and cropping it to 85x85?
If it is, then pardon the question, but who thought hard coding that was a good idea? Use Imagecache and Imagecache profile people. Easy to install and setup and will get rid of a lot of headache. Not everybody wants the picture resized and cropped especially to 85x85.
If that's not what its doing then sorry for the rant.
Comment #10
arcane commentedThe code above gets the user picture dimensions from whatever you have set in the variable. If no variable exists, it defaults to 85x85.
Comment #11
rburgundy commentedsubscribing
Comment #12
hexen commentedsubscribing...
Comment #13
vectoroc commentedNowadays patch is not actual. Pictures is displayed directly from facebook
Comment #14
vectoroc commentedComment #15
vintageb commentedSorry, a noobie here, where do I put this code to change the FB picture size?
Comment #16
ensignavenger commentedCould this be made compatible with ImageCache Profiles module? I'm pretty new to developing, but I'm looking into doing this. I need it to work for a site I am building. If anyone has ideas, please let me know.
Comment #17
vectoroc commented#16 : use search - #915406: Changing the facebook picture using imagecace