PHPackages                             clarkwinkelmann/flarum-ext-predefined-avatars - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. clarkwinkelmann/flarum-ext-predefined-avatars

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

clarkwinkelmann/flarum-ext-predefined-avatars
=============================================

Make users choose their avatar from a list

1.0.1(3y ago)33.6k—0%MITTypeScript

Since May 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/clarkwinkelmann/flarum-ext-predefined-avatars)[ Packagist](https://packagist.org/packages/clarkwinkelmann/flarum-ext-predefined-avatars)[ RSS](/packages/clarkwinkelmann-flarum-ext-predefined-avatars/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Predefined Avatars
==================

[](#predefined-avatars)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/9adcf5f303db89e182d5da7a5aaece9ed115dbab4c32dea0c8acbe8bcd24b693/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c61726b77696e6b656c6d616e6e2f666c6172756d2d6578742d707265646566696e65642d617661746172732e737667)](https://packagist.org/packages/clarkwinkelmann/flarum-ext-predefined-avatars) [![Total Downloads](https://camo.githubusercontent.com/0ac5f680145d96d69cc4f4dc85c9a50f401d5218da2e76a9b3f8d4638f987cdc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c61726b77696e6b656c6d616e6e2f666c6172756d2d6578742d707265646566696e65642d617661746172732e737667)](https://packagist.org/packages/clarkwinkelmann/flarum-ext-predefined-avatars) [![Donate](https://camo.githubusercontent.com/0d6e4d8b50b5983a58205941b1a581b1305903393b7a39da574e3f60af3c7f5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2d646f6e6174652d79656c6c6f772e737667)](https://www.paypal.me/clarkwinkelmann)

Make your Flarum users choose their avatar from a list.

The extension can be configured in various ways to keep or disable custom avatar uploads or default "initials" avatars.

The avatar is still changed in the same way that Flarum does it by default: by clicking the avatar on the user profile.

The extension doesn't come with any image. You can upload your own from the admin.

Don't forget to update the "Choose an avatar from the predefined list" permission to include your users. You can set the permission to "Everyone" to allow users to change to a custom avatar before validating their email.

Installation
------------

[](#installation)

```
composer require clarkwinkelmann/flarum-ext-predefined-avatars:*

```

Avatar storage
--------------

[](#avatar-storage)

The avatars are placed inside the `public/assets/avatars/predefined` folder. There is a single instance of each image so if multiple users use the same predefined image the file will only be loaded once.

The extension attempts to clean up deleted images by removing them from disk and from any user who might still have that avatar. However it's possible for some images to not be deleted if you upload them but never save the new settings.

If you prefer to name your images with a recognisable filename instead of the default random identifier, you can manually add them to the `predefined` folder and then edit the `predefinedAvatars` key in the `settings` table. The `predefinedAvatars` settings is a JSON encoded array of the available filenames as string.

To manually set a predefined avatar to a user from the database (from phpMyAdmin for example), use the format `predefinedAvatar:` in the `avatar_url` column. For example if a file is `avatars/predefined/abcdefg.png`, its value in the setting will be `abcdefg.png` and its value in the `avatar_url` column will be `predefinedAvatar:abcdefg.png`.

Do not use the actual path to the image in `avatar_url`, otherwise Flarum will attempt to delete the file when the user changes avatar!

Known issues
------------

[](#known-issues)

- If a user connects with a social login that provides a default avatar, "Only allow predefined avatars" will be bypassed. However the "Default avatar" setting should override the social avatar.
- If you delete a predefined avatar, the users who used the avatar will be reverted to having no avatar even if "Prevent setting no avatar" is enabled.
- Existing users on the forum are not automatically updated to meet the constraints when you enable the extension for the first time.

Support
-------

[](#support)

This extension is under **minimal maintenance**.

It was developed for a client and released as open-source for the benefit of the community. I might publish simple bugfixes or compatibility updates for free.

You can [contact me](https://clarkwinkelmann.com/flarum) to sponsor additional features or updates.

Support is offered on a "best effort" basis through the Flarum community thread.

Links
-----

[](#links)

- [GitHub](https://github.com/clarkwinkelmann/flarum-ext-predefined-avatars)
- [Packagist](https://packagist.org/packages/clarkwinkelmann/flarum-ext-predefined-avatars)
- [Discuss](https://discuss.flarum.org/d/27302)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~188 days

Total

3

Last Release

1448d ago

Major Versions

0.1.0 → 1.0.02021-05-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/0538135c1debcef5602dce7ece027909cc832b7a6284ab9189a19aa8de98d60d?d=identicon)[clarkwinkelmann](/maintainers/clarkwinkelmann)

---

Top Contributors

[![clarkwinkelmann](https://avatars.githubusercontent.com/u/5264300?v=4)](https://github.com/clarkwinkelmann "clarkwinkelmann (6 commits)")

---

Tags

avatarflarum

### Embed Badge

![Health badge](/badges/clarkwinkelmann-flarum-ext-predefined-avatars/health.svg)

```
[![Health](https://phpackages.com/badges/clarkwinkelmann-flarum-ext-predefined-avatars/health.svg)](https://phpackages.com/packages/clarkwinkelmann-flarum-ext-predefined-avatars)
```

###  Alternatives

[fof/byobu

Well integrated, advanced private discussions.

61105.8k9](/packages/fof-byobu)[fof/user-bio

Add a user bio to user profiles

2196.5k9](/packages/fof-user-bio)[fof/links

Manage Flarum primary navbar menu links

39118.3k2](/packages/fof-links)[fof/drafts

Allow users to create post and discussion drafts

1771.1k5](/packages/fof-drafts)[fof/best-answer

Mark a post as the best answer in a discussion

26135.2k15](/packages/fof-best-answer)[fof/polls

 A Flarum extension that adds polls to your discussions

25122.4k9](/packages/fof-polls)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
