BuddyPress natively supports three options: 'user', 'group', 'blog' a plugin may register more. (string) The kind of object for which you're getting an avatar. If no 'item_id' can be determined in this way, the function returns false. If no 'item_id' is present, the function attempts to infer an ID from the 'object' + the current context: if 'object' is 'user' and the current page is a user page, 'item_id' will default to the displayed user ID if 'group' and on a group page, to the current group ID if 'blog', to the current blog's ID. (int|bool) The numeric ID of the item for which you're requesting an avatar (eg, a user ID). This auto-detection is described more below, when discussing specific arguments. All arguments are technically optional some will, if not provided, be auto-detected by bp_core_fetch_avatar(). ( array| string) (Optional) An array of arguments.
To disable Gravatar fallbacks locally: add_filter( ‘bp_core_fetch_avatar_no_grav’, ‘_return_true’ ) Parameters $args When a local avatar is not found, Gravatar is queried. This function gives precedence to locally-uploaded avatars. Supports avatars for users, groups, and blogs by default, but can be extended to support custom components as well. Code Reference Functions bp_core_fetch_avatar() bp_core_fetch_avatar( array|string $args = '' )