Matondo Avatar Picker plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Matondo Avatar Picker

Community

A form component providing a responsive gallery and upload tool for selecting user profile avatars.

Tags: Forms
Supported versions:
5.x
Matondo avatar Author: Matondo

Package health

Beta

Automated checks of this plugin's Composer package

100 / 100
Security 100
Maintenance 100
Ecosystem 100
15 checks
  • Skipped: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Skipped: Dependabot PR responsiveness
  • Skipped: Renovate MR responsiveness
  • Skipped: Dependabot or Renovate configured
  • Skipped: Dependency update cooldown configured
  • Skipped: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist).
  • Skipped: Commit and release recency
  • Passed: composer.lock not committed by library composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.1 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 17 hours ago

Documentation

A beautiful, highly-customizable avatar gallery and upload picker component for Filament PHP.

Avatar Picker Demo

#Features

  • Component First: Use it as a form field (AvatarPicker::make('avatar')) anywhere in your Filament forms.
  • Curated Avatar Gallery: Display a gorgeous grid of pre-defined avatars.
  • Custom Uploads: Isolated secure directory for user uploads (custom-avatars).
  • Multi-language Support: Fully translated into 12 languages (including Arabic, Spanish, French, Portuguese, Chinese, etc.).
  • Smart Sorting: Customizable initial avatar priority.
  • Dark/Light Mode: First-class support for Filament themes.

#Installation

  1. Install the package via Composer:
composer require matondojk/filament-avatar-picker
  1. Publish the assets (this will copy the default curated avatars to your public directory):
php artisan vendor:publish --tag=filament-avatar-picker-assets

#Usage

Use the AvatarPicker component inside any of your Filament forms (such as in a Resource or a custom Page). It acts just like a standard field and automatically handles both file uploads and gallery selection.

use MatondoJK\FilamentAvatarPicker\Components\AvatarPicker;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            AvatarPicker::make('avatar')
                ->label('Profile Picture'), // You can define any label you want!
                
            // ... other fields
        ]);
}

The component automatically saves the chosen string (either a gallery filename or the uploaded file path) directly to the database column you specify (avatar in the example above). No forced migrations or table changes!

#Setting up the User Model

For the avatar to work properly globally in the Filament panel (such as in the topbar), your User model must implement the HasAvatar interface from Filament.

Important: You must create your own string field in your database (e.g., avatar_url or avatar) via your own migration to save the avatar path. This package does NOT include any migrations because table structure should remain in your control.

Here is exactly how your User model should look:

<?php

namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
use Filament\Models\Contracts\HasAvatar;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Storage;

#[Fillable(['name', 'email', 'password', 'avatar_url'])]
#[Hidden(['password', 'remember_token'])]
class User extends Authenticatable implements HasAvatar
{
    /** @use HasFactory<UserFactory> */
    use HasFactory, Notifiable;

    /**
     * Get the attributes that should be cast.
     *
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'email_verified_at' => 'datetime',
            'password' => 'hashed',
        ];
    }

    public function getFilamentAvatarUrl(): ?string
    {
        return $this->avatar_url ? Storage::disk('public')->url($this->avatar_url) : null;
    }
}

#Publishing Views & Translations

If you wish to modify the blade views or translations, you can publish them:

php artisan vendor:publish --tag=filament-avatar-picker-views

#License

The MIT License (MIT). Please see License File for more information.

The author

Matondo avatar Author: Matondo

Software Engineer specializing in PHP and Laravel, focused on designing and developing scalable SaaS platforms and enterprise web applications. Experienced in software architecture, RESTful APIs, FilamentPHP, Livewire, AI integrations, and database design, delivering secure, maintainable, and high-performance solutions through clean code and best engineering practices.

Plugins
3
Stars
8

From the same author