Wow, that works perfectly! I can even disable photon on all pages if I want with - is_page() (not sure why you'd do that)... BUT.. and this is the whole reason why I found this issue in the first place, since PHOTON breaks uploading or editing avatars in Buddypress, this solves the problem! By putting the above function in your functions.php (or bp-custom.php one or the other) customized as such:
function jeherve_disable_photon_on_page( $skip, $src ) {
if ( bp_is_group_admin_page( 'group-avatar' ) || bp_is_change_avatar() ) {
// Skip the images
return true;
}
return $skip;
}
add_filter( 'jetpack_photon_skip_image', 'jeherve_disable_photon_on_page', 10, 3 );
This fixes the problem with Buddypress and allows you to use Photon on your Wordpress site without breaking the avatar functions in Buddypress! Yeah!
Jeremy, do you want to pass this info on to the Buddypress people? Or should I post this solution somewhere to let Buddypress people know this? Or is it good enough being here in the post?
Thanks for your help!
Charles