For BuddyPress, there is this plugin that is similar: https://wordpress.org/plugins/bp-local-avatars/