Matondo Avatar Picker by Matondo
CommunityA form component providing a responsive gallery and upload tool for selecting user profile avatars.
Author:
Matondo
Package health
Automated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Passed: Dependabot or Renovate configured
-
Failed:
Dependency update cooldown configured
—
No cooldown configured in
.github/dependabot.yml. View details on Plumb - Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 7 days ago; last release 7 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis 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.1supports current PHP8.5. - Skipped: Current Symfony version supported
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
.
Documentation
A beautiful, highly-customizable avatar gallery and upload picker component for Filament PHP.
![]()
#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
- Install the package via Composer:
composer require matondojk/filament-avatar-picker
- Publish the assets (this will copy the default curated avatars to your storage directory):
php artisan vendor:publish --tag=filament-avatar-picker-assets
php artisan storage:link
#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
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.
From the same author
Data Copilot
Generate intelligent charts, data tables, and automated PDF reports directly from your database using natural language prompts.
Author:
Matondo
Social Login
A beautiful, plug-and-play social login integration for modern Filament PHP panels.
Author:
Matondo
Event Calendar
A comprehensive plugin to manage virtual and in-person events, handle RSVPs, send automated reminders, and add events to Google Calendar.
Author:
Matondo
Featured Plugins
A selection of plugins curated by the Filament team
Noir Theme
A theme that gives panels a focused, refined look with near-black surfaces, crisp actions, and restrained color.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese