Fixing Aspect Ratio Issue with BuddyPress Avatar

November 7, 2012 / By: Adrian

A recent issue we had was with the interface to edit an avatar profile image in BuddyPress. It was locking in an aspect ratio and that was limiting the users.

Here’s a solution to get rid of that aspect ratio lock.

Note: This is not the best solution as your modifying the core (something we don’t do) but BuddyPress leaves us no option.

Browse to: /wp-content/plugins/buddypress/bp-core/bp-core-cssjs.php

Go to line 62 and comment out the aspectRatio property:

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?> ]
});


 
 

Need Help?

Give us a call

786 393-5826

Talk with one of our professionals and start working with TECKpert today.

Speak with us

Over 20 national and regional awards

2012

Interactive Media Awards - Winner for TECKpert.com

Daily Business Review - Best Of Internet Marketing and Web Design

2013

Davey Awards - Silver Award - Midtown Women's Center

Davey Awards - Silver Award - MSG Law

W3 Awards - Silver Award - Leon Cosgrove

Communicator Awards - Award of Distinction - 400SunnyIsles.com

Communicator Awards - Award of Distinction - Esolist.com

Communicator Awards - Award of Distinction - CSK Mobile

2014

W3 Awards - Silver Award - CorkageFee (Mobile Application)

Communicator Awards - Award of Distinction - ERP Maestro

Communicator Awards - Award of Distinction - AADS

Communicator Awards - Award of Excellence - TECKpert

Davey Awards - Silver Award - CorkageFee (Mobile Application)

W3 Awards - Silver Award - Hubdin

2015

Daily Business Review - Best Of Internet Marketing - Ranked #3

Daily Business Review - Best Of Web Design - Ranked #3

South Florida Business Journal - Top Web Design and Development Company - Ranked #5

2016

South Florida Business Journal - Top Web Design and Development Company - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #3

Davey Awards - Silver Award - CorkageFee (website)

2017

South Florida Business Journal - Top Web Design and Development Company - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #3

Daily Business Review - Best Of Web Design - Ranked #3

Davey Awards - Silver Award - Zilbert