In case anyone’s curious, I ended up changing the following in bp-core-avatars.php:
// If the uploaded image is smaller than the "full" dimensions, throw a warning.
if ( $avatar_attachment->is_too_small( $bp->avatar_admin->image->file ) ) {
bp_core_add_message( sprintf( __( 'You have selected an image that is smaller than recommended. For best results, upload a picture larger than %d x %d pixels.', 'buddypress' ), bp_core_avatar_full_width(), bp_core_avatar_full_height() ), 'error' );
}
Changed to:
// If the uploaded image is smaller than the "full" dimensions, throw a warning.
if ( $avatar_attachment->is_too_small( $bp->avatar_admin->image->file ) ) {
return false;
}
I realize changing anything in core files is a terrible idea, but no clue how to make it work otherwise. This basically doesn’t allow uploading any file under minimum dimensions.
I’ve been trying the same thing in bp-custom.php:
function check_avatar_upload() {
global $bp;
if ( $avatar_attachment->is_too_small( $bp->avatar_admin->image->file ) ) {
return false;
}
}
add_action( 'bp_core_pre_avatar_handle_upload', 'check_avatar_upload', 10, 3 );
When in bp-custom.php the above results in “HTTP error.” for all uploads. Changing the action to bp_core_avatar_handle_upload just uploads everything.