Avatar Cropping Issue – Users are moaning and moaning
-
Users that sign up with FB are driving me insane with avatars that BP tries to scale incorrectly… they simply hate stretched avatars… I tried finding a a solution… but as far as i can see is FB Autoconnect just copies the avatar as is to _full and _thumb, it does not “process” them and crop them square, hence the stretching
I found this and for a moment i thought ok… could work but as i said the plugin does not process the avatar. If anything needs to be added to this great plugin Justin, it is to be able render user avatars square?
==========================================================
Looking to get rid of the annoying aspect ratio on your BuddyPress avatar crop tool? This was very poorly documented and nowhere to be found on Google so I decided to figure this out and share the solution with the community. This is probably not the best solution as I had to modify a core file for BuddyPress, but it turns out this plugin was created in a fashion that forces you to modify the core files anyhow… here’s what I did:Open up /wp-content/plugins/buddypress/bp-core/bp-core-cssjs.php
Somewhere around line 92 you should find the call to Jcrop (the jQuery plugin used to crop the avatar in BuddyPress). All we have to do here is comment out the aspectRatio property like so:
jQuery('#avatar-to-crop').Jcrop({ onChange: showPreview, onSelect: showPreview, onSelect: updateCoords, /* aspectRatio: <?php echo $aspect_ratio ?>, */ setSelect: [ 0, 0, <?php echo $full_width?>, <?php echo $full_height?> ] });
That should do it!
=============================================================
- The topic ‘Avatar Cropping Issue – Users are moaning and moaning’ is closed to new replies.