Plugins should be able to register a new avatar provider at the core. The core should then register its own providers e.g. Default (uploaded avatars and default) and Gravatar. The admin can select the default avatar provider for new accounts in the system settings. Each user can select his own preference on their profile page.