===  AddonLogic Profile Avatar Uploader ===
Contributors: snehalpancholi
Tags: avatar, profile photo, custom avatar, gravatar, user photo
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let users upload a custom profile photo that overrides Gravatar sitewide — no third-party service required.

== Description ==

AddonLogic Profile Avatar Uploader adds an AJAX-powered photo upload section to every user's profile page. Uploaded images are stored in the WordPress media library and automatically override Gravatar wherever `get_avatar()` or `get_avatar_url()` is called.

**Features:**

* AJAX upload — instant preview without a page reload
* Overrides Gravatar sitewide via native WordPress filters
* Images stored as WordPress media attachments
* Configurable max file size (1–10 MB)
* Accepted formats: JPG, PNG, GIF, WebP
* One-click photo removal, gracefully falls back to Gravatar
* Admins can manage any user's avatar from the Edit User screen
* Uninstall removes all uploaded files cleanly

== Installation ==

1. Upload the `profile-avatar-uploader` folder to `/wp-content/plugins/`.
2. Activate the plugin via the **Plugins** screen.
3. Go to **Settings > Profile Avatar** to configure the maximum file size.
4. Users can now upload their photo from **Profile > Custom Avatar**.

== Frequently Asked Questions ==

= Will this remove my existing Gravatar? =
No. Gravatar is only overridden when a user has uploaded a custom photo. Removing the custom photo restores Gravatar automatically.

= Where are the uploaded images stored? =
In the WordPress Media Library, unattached to any post.

= Can admins upload avatars for other users? =
Yes. Any user with the `edit_users` capability can upload or remove avatars for other accounts via the Edit User screen.

== Changelog ==

= 1.0.0 =
* Initial release.
