WP Manifestindependent plugin directory
manifest / users / wordpress_local-avatar

Local User Avatar WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

Adds an avatar field to user profiles and replaces Gravatar with the locally uploaded image

★ 0stars
14release downloads
≈10active sites
1.0.2latest · 8mo ago

Install

Download h2-local-avatar-1.0.2.zip From the 1.0.2 release on GitHub, Feb 16, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/hhansen06/wordpress_local-avatar/releases/download/1.0.2/h2-local-avatar-1.0.2.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Ein einfaches und leichtgewichtiges WordPress Plugin, das es ermöglicht, lokale Avatar-Bilder für Benutzerprofile hochzuladen und Gravatar vollständig zu ersetzen.

Beschreibung

Local User Avatar fügt Benutzerprofilen ein Avatar-Feld hinzu und ersetzt Gravatar mit lokal hochgeladenen Bildern. Das Plugin bietet eine datenschutzfreundliche Alternative zu Gravatar, da keine externen Dienste für Profilbilder verwendet werden müssen.

Features

  • ✅ Lokale Avatar-Uploads: Lade Avatare direkt in die WordPress-Mediathek hoch
  • ✅ Gravatar-Ersatz: Ersetzt automatisch alle Gravatar-Aufrufe durch lokale Avatare
  • ✅ WordPress Media Library Integration: Nutzt die native WordPress-Medienverwaltung
  • ✅ Responsive Vorschau: Zeigt eine Live-Vorschau des ausgewählten Avatars
  • ✅ Platzhalter-SVG: Zeigt automatisch einen generischen Avatar an, wenn kein Bild hochgeladen wurde
  • ✅ Einfache Bedienung: Intuitives Interface im Benutzerprofil
  • ✅ Sicher: Nutzt WordPress Nonces und Capability-Checks
  • ✅ Leichtgewichtig: Single-File Plugin ohne externe Abhängigkeiten

Installation

Manuelle Installation

  1. Lade die Datei local-avatar.php in das Verzeichnis /wp-content/plugins/local-user-avatar/ hoch
  2. Aktiviere das Plugin über das 'Plugins' Menü in WordPress
  3. Gehe zu Benutzer → Profil um deinen lokalen Avatar hochzuladen

Installation via Upload

  1. Gehe zu Plugins → Installieren in deinem WordPress-Dashboard
  2. Klicke auf Plugin hochladen
  3. Wähle die ZIP-Datei aus und klicke auf Jetzt installieren
  4. Aktiviere das Plugin nach der Installation

Verwendung

Avatar hochladen

  1. Gehe zu Benutzer → Profil oder bearbeite ein Benutzerprofil
  2. Scrolle zum Abschnitt Avatar
  3. Klicke auf Select or Upload Avatar
  4. Wähle ein Bild aus der Mediathek oder lade ein neues Bild hoch
  5. Klicke auf Use this avatar
  6. Speichere dein Profil

Avatar entfernen

  1. Gehe zu deinem Benutzerprofil
  2. Klicke auf Remove Avatar
  3. Speichere dein Profil

Der Avatar wird automatisch überall dort angezeigt, wo WordPress Avatare verwendet:

  • Kommentare
  • Benutzerlisten
  • Toolbar
  • Alle Theme- und Plugin-Bereiche, die get_avatar() verwenden

Anforderungen

  • WordPress 5.0 oder höher
  • PHP 7.4 oder höher
  • Berechtigung zum Hochladen von Dateien (upload_files Capability)

Technische Details

Hooks & Filter

Das Plugin nutzt folgende WordPress-Hooks:

Actions

  • show_user_profile - Zeigt das Avatar-Feld im eigenen Profil
  • edit_user_profile - Zeigt das Avatar-Feld beim Bearbeiten anderer Profile
  • personal_options_update - Speichert Avatar-Änderungen im eigenen Profil
  • edit_user_profile_update - Speichert Avatar-Änderungen in anderen Profilen
  • admin_head-profile.php - Blendet Gravatar-Abschnitt aus
  • admin_head-user-edit.php - Blendet Gravatar-Abschnitt aus

Filter

  • get_avatar - Ersetzt Avatar-HTML mit lokalem Avatar
  • get_avatar_data - Ersetzt Avatar-URL-Daten mit lokalem Avatar

User Meta Felder

Das Plugin speichert folgende User Meta Felder:

  • local_user_avatar_id - Attachment-ID des Avatar-Bildes
  • local_user_avatar_url - URL des Avatar-Bildes (Fallback)

Häufig gestellte Fragen (FAQ)

Kann ich das Plugin mit Gravatar verwenden?

Nein, das Plugin ersetzt Gravatar vollständig. Dies ist beabsichtigt, um eine datenschutzfreundliche Lösung anzubieten.

Welche Bildformate werden unterstützt?

Alle von WordPress unterstützten Bildformate (JPG, PNG, GIF, WebP, etc.).

Was passiert, wenn kein Avatar hochgeladen wurde?

Das Plugin zeigt automatisch einen generischen SVG-Platzhalter-Avatar an.

Funktioniert das Plugin mit allen Themes?

Ja, das Plugin funktioniert mit allen Themes, die die WordPress-Standard-Avatar-Funktionen (get_avatar()) verwenden.

Beeinflusst das Plugin die Performance?

Nein, da die Avatare lokal gehostet werden, entfallen externe HTTP-Anfragen an Gravatar, was die Ladezeit sogar verbessern kann.

Deinstallation

  1. Deaktiviere das Plugin über Plugins → Installierte Plugins
  2. Lösche das Plugin
  3. Optional: Entferne die User Meta Felder local_user_avatar_id und local_user_avatar_url aus der Datenbank

Changelog

1.0.0

  • Erste Veröffentlichung
  • Avatar-Upload-Funktionalität
  • Gravatar-Ersetzung
  • SVG-Platzhalter für Benutzer ohne Avatar
  • Integration der WordPress Media Library

Autor

Henrik Hansen

Lizenz

Dieses Plugin ist frei verfügbar. Bitte füge eine passende Lizenz hinzu (z.B. GPL-2.0+, MIT).

Support

Für Bugs, Feature-Requests oder Fragen, bitte öffne ein Issue auf GitHub: https://github.com/hhansen06/wordpress_local-avatar/issues

Mitwirken

Pull Requests sind willkommen! Für größere Änderungen öffne bitte zuerst ein Issue, um zu besprechen, was du ändern möchtest.


Hinweis zur Datenschutzfreundlichkeit: Dieses Plugin sendet keine Daten an externe Dienste und ist vollständig DSGVO-konform, da alle Avatare lokal gespeichert werden.

Releases

3 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
1.0.2 latest
Feb 16, 2026 8mo ago
h2-local-avatar-1.0.2.zip
3
Feb 15, 2026 8mo ago
h2-local-avatar-1.0.1.zip
9
Feb 15, 2026 8mo ago
h2-local-avatar-1.0.0.zip
2

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

D+ grade

Security

Local User Avatar 1.0.2 · audited by WP Registry

High-severity findings.

1 high 1 medium
Audited release
1.0.2
Findings
2
Worst severity
high
Content hash
60fe81bfc42eb7c5c3abbe1d…

Findings

  • high Subscriber+ granted upload_files on core upload endpoints (any allowed mime)

    file_access

    user_has_cap → grant_upload_for_abonennten sets upload_files for any is_abonent_user() account whenever is_admin() and $pagenow is profile.php, user-edit.php, async-upload.php, media-upload.php, or admin-ajax.php (the last covers every admin-ajax action, not just upload-attachment). is_abonent_user() returns true for the default subscriber role, so a self-registered customer on a default WordPress install receives Author-equivalent upload rights on those screens. The profile UI calls wp_enqueue_media(), which localizes a valid media-form nonce; core async-upload.php / wp_ajax_upload_attachment then call media_handle_upload() with only that nonce plus upload_files. There is no server-side image-only allow-list (the media modal's library:{type:'image'} is client-side; core restricts to images only for custom-header/custom-background). Observable: a Subscriber can POST a .zip/.pdf/.docx/.css/.mp4/etc. (everything in get_allowed_mime_types() except html/js/swf/exe) and the file is written under wp-content/uploads and served on the site origin. Intended avatar upload does not require this capability amplifier — a dedicated image-only handler would suffice. Additional blast: media-upload.php?tab=library uses wp_edit_attachments_query, which is not filtered by limit_media_library_for_abonent, so the same Subscriber can list titles/URLs of all media.

    local-avatar.php:33-37,318-371

    Recommendation

    Do not grant upload_files to subscribers. Implement a dedicated avatar POST handler that checks current_user_can('edit_user', $user_id), verifies the existing local_user_avatar_update nonce, and accepts only a small image mime allow-list (jpeg/png/webp/gif) via wp_check_filetype_and_ext on the tmp file. If the WP media modal must stay, (1) grant upload_files only on profile.php plus ajax actions upload-attachment / query-attachments (not all of admin-ajax.php, not media-upload.php), (2) filter upload_mimes for that request to images only, (3) keep ajax_query_attachments_args scoped to author=current user with a real posts_per_page (0 is treated as empty by WP_Query).

  • medium Avatar crop/save accepts any attachment ID (no ownership or edit_post check)

    missing_capability

    handle_avatar_crop is hooked to wp_ajax_vv_avatar_crop. The capability check is current_user_can('edit_user', get_current_user_id()), which map_meta_cap allows for every logged-in user (self-edit). The vv_avatar_crop nonce is printed on the subscriber profile (can_manage_avatar is true). $_POST['id'] is only int-cast; there is no current_user_can('edit_post', $id), no post_author comparison, and no wp_attachment_is_image(). get_attached_file() + wp_crop_image() then writes cropped-{basename} beside the original and returns its public uploads URL. save_field has the same gap: any local_user_avatar_id the Subscriber POSTs (with their profile nonce) is stored, and if local_user_avatar_url is empty, create_square_avatar() loads that attachment into the image editor and writes avatar-{user_id}.jpg. Observable: a Subscriber who can guess or enumerate attachment IDs (sequential; also listed via media-upload.php as in finding 1) can force the server to read/re-encode other users' media and drop new files in wp-content/uploads.

    local-avatar.php:227-264

    Recommendation

    After the nonce check, require that the attachment exists, is an image (wp_attachment_is_image), and is owned by the current user (or current_user_can('edit_post', $attachment_id)). Apply the same ownership/mime checks in save_field before update_user_meta(local_user_avatar_id) and before create_square_avatar(). Reject empty crop dimensions as you already do; also cap source dimensions to avoid memory DoS.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.