=== Real Simple Avatar ===
Contributors: avsalexandra
Tags: avatar, local avatar, user avatar, profile picture, gravatar
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Local user avatars for WordPress: upload a profile photo, pick a preset, or auto-generate colourful initials. No Gravatar, no Media Library clutter.

== Description ==

Real Simple Avatar gives your users a real profile picture on your WordPress site — without Gravatar and without cluttering your Media Library.

Users can upload their own photo or choose a preset avatar right from the front end. If no avatar is set, the plugin generates a clean, colourful SVG avatar from the user's initials, so every user has a proper avatar from day one — no grey silhouettes.

It is built to stay tidy: when a user changes or removes their avatar, the previous file is deleted from the Media Library automatically. One user, one file, at one size — WordPress does not generate extra thumbnails for it.

**Why people choose Real Simple Avatar**

* **A local alternative to Gravatar** — avatars live on your own site. No account required, no external request per avatar, no email hash sent to a third party.
* **No Media Library clutter** — the old avatar attachment is removed automatically on replacement, on deletion, and when a user account is deleted. Saves disk space.
* **Automatic SVG initials** — lightweight vector avatars with a background colour that stays the same for each user. As of 1.0.2 they are inlined into the page, with no extra request.
* **Front-end form** — the `[rsava_avatar_form]` shortcode lets logged-in users change their avatar instantly (AJAX, no page reload, no admin access).
* **Preset avatars** — show a grid of ready-made pictures. Replace the built-in set with your own, or disable photo uploads entirely and let users pick a preset only.
* **Strict size control** — set the crop size (e.g. 240 × 240 px). Uploaded images are stored only at that size.
* **Configurable** — allowed formats (PNG, JPG, JPEG, WebP, HEIC, HEIF, AVIF, GIF), maximum file size, initials palette and text colour.
* **Admin control** — upload or remove any user's avatar from the Edit User screen.
* **Clean uninstall** — optionally remove all settings and uploaded avatars when the plugin is deleted.

A good fit for membership sites, forums, communities, multi-author blogs, and shops with customer accounts.

---

**По-русски**

Real Simple Avatar даёт пользователям вашего сайта настоящий аватар — без Gravatar и без мусора в медиатеке WordPress.

Пользователь загружает своё фото или выбирает готовую аватарку прямо на странице сайта. Если аватар не задан, плагин рисует аккуратный цветной SVG-аватар с инициалами — аватар есть у всех сразу, без серых силуэтов.

Плагин следит за порядком: при смене или удалении аватара предыдущий файл автоматически удаляется из медиатеки. Один пользователь — один файл одного размера, лишние миниатюры WordPress не создаёт.

**Почему выбирают Real Simple Avatar**

* **Локальная альтернатива Gravatar** — аватары хранятся на вашем сайте. Не нужен аккаунт, нет запроса на сторонний сервер, хеш почты никуда не уходит.
* **Медиатека не засоряется** — старый файл аватара удаляется сам при замене, при удалении аватара и при удалении пользователя. Экономит место на хостинге.
* **Автоматические SVG-инициалы** — лёгкие векторные аватары, цвет фона закреплён за пользователем. С версии 1.0.2 вставляются прямо в страницу, без лишнего запроса.
* **Форма на сайте** — шорткод `[rsava_avatar_form]`: пользователь меняет аватар мгновенно (AJAX, без перезагрузки и без входа в админку).
* **Готовые аватарки** — сетка картинок на выбор. Можно заменить встроенный набор своим или запретить загрузку фото и оставить только пресеты.
* **Контроль размера** — задаёте размер обрезки (например, 240 × 240 px). Изображение хранится только в этом размере.
* **Гибкие настройки** — форматы (PNG, JPG, JPEG, WebP, HEIC, HEIF, AVIF, GIF), максимальный размер файла, палитра и цвет инициалов.
* **Управление из админки** — загрузка и удаление аватара любого пользователя на странице редактирования профиля.
* **Чистое удаление** — по желанию убрать все настройки и загруженные аватары при удалении плагина.

Подходит для сайтов с подпиской, форумов, сообществ, блогов с несколькими авторами и магазинов с личным кабинетом.

== Installation ==

1. Install the plugin from **Plugins → Add New** (search for "Real Simple Avatar"), or upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings → Avatar** to configure the plugin.
4. Add the shortcode `[rsava_avatar_form]` to any page or post where you want users to manage their avatar.

== Frequently Asked Questions ==

= Does Real Simple Avatar work without Gravatar? =
Yes. Avatars are stored locally on your own site, and initials are shown when no avatar is set. Gravatar is not used and no external request is made to load an avatar.

= Можно ли обойтись без Gravatar? =
Да. Аватары хранятся локально на вашем сайте, а если аватар не задан — показываются инициалы. Gravatar не используется, внешних запросов за аватаром нет.

= Does it delete old avatar files? =
Yes. When a user replaces or removes their avatar, the previous file is deleted from the Media Library automatically. The same happens when a user account is deleted.

= Удаляет ли плагин старые файлы аватаров? =
Да. При замене или удалении аватара прошлый файл автоматически удаляется из медиатеки. То же происходит при удалении учётной записи пользователя.

= Can I replace the built-in preset avatars with my own? =
Yes. In **Settings → Avatar → Preset Avatars**, upload your own images. You can also disable the built-in presets entirely and show only your custom ones.

= Можно ли заменить встроенные пресеты аватаров своими? =
Да. В **Настройки → Аватар → Готовые аватары** загрузите свои изображения. Также можно полностью отключить встроенные пресеты и показывать только свои.

= Can I stop users from uploading a custom photo and only let them choose from presets? =
Yes. In **Settings → Avatar → Media**, uncheck "Allow file upload". The upload button is hidden and users can only pick from preset images.

= Можно ли запретить загрузку своего фото и оставить только выбор из пресетов? =
Да. В **Настройки → Аватар → Медиа** снимите галочку «Разрешить загрузку файлов». Кнопка загрузки скроется, останется только выбор из готовых аватарок.

= What image formats are supported? =
By default: PNG, JPG, JPEG, WebP, HEIC. You can add or remove formats (including AVIF and GIF) in **Settings → Avatar → Media**.

= Какие форматы изображений поддерживаются? =
По умолчанию: PNG, JPG, JPEG, WebP, HEIC. Можно добавить или убрать форматы (в том числе AVIF и GIF) в **Настройки → Аватар → Медиа**.

= Where is the avatar stored? =
Uploaded photos are stored in the WordPress Media Library as a regular attachment. Each user has at most one avatar attachment; the old one is deleted automatically when a new photo is uploaded or the avatar is removed.

= Где хранится аватар? =
Загруженные фото хранятся в медиатеке WordPress как обычные вложения. У каждого пользователя максимум один файл аватара — старый удаляется автоматически при замене или удалении аватара.

= What happens to avatar files when a user is deleted? =
The avatar attachment is automatically removed from the Media Library when a user account is deleted.

= Что происходит с аватаром при удалении пользователя? =
Файл аватара автоматически удаляется из медиатеки при удалении учётной записи пользователя.

= How do I completely remove all plugin data? =
In **Settings → Avatar → Advanced**, check "Delete data on uninstall", save, then delete the plugin from the Plugins screen. All plugin options and uploaded avatar media are removed in batches.

= Как полностью удалить все данные плагина? =
В **Настройки → Аватар → Дополнительно** включите «Удалить данные при удалении плагина», сохраните, затем удалите плагин через страницу «Плагины». Все настройки и загруженные аватары будут удалены пакетами.

== Screenshots ==

1. Front-end avatar form added with the `[rsava_avatar_form]` shortcode.
2. Changing a user's avatar from the WordPress admin.
3. Plugin settings page.
4. Initials avatar colour settings.

== Changelog ==

= 1.0.3 =
* Rewrote the description and refined the tags for clarity and discoverability. No functional changes.

= 1.0.2 =
* Tested with WordPress 7.1.
* Initials avatars are now rendered inline (data URI) in the standard avatar output, removing one admin-ajax request per avatar. The admin-ajax endpoint is kept for the REST API and other callers that need a real URL.

= 1.0.1 =
* Bug fixes and minor improvements. Plugin version updated to 1.0.1.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.3 =
Updated plugin description and tags. No code changes.

= 1.0.2 =
Tested with WordPress 7.1. Initials avatars now render inline for fewer requests.

= 1.0.1 =
Bug fixes and minor improvement.

= 1.0.0 =
First public release.

== Compatibility ==

Tested with PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4. Tested with WordPress 5.0 – 7.1

== License ==

This plugin is licensed under the GPLv2 or later.
