PHPackages                             multiavatar/multiavatar-php - 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. [Image &amp; Media](/categories/media)
4. /
5. multiavatar/multiavatar-php

ActiveLibrary[Image &amp; Media](/categories/media)

multiavatar/multiavatar-php
===========================

Multicultural Avatar Generator

v1.0.5(5y ago)655162.4k↓33%48[1 issues](https://github.com/multiavatar/multiavatar-php/issues)[1 PRs](https://github.com/multiavatar/multiavatar-php/pulls)4proprietaryPHP

Since Dec 15Pushed 5y ago21 watchersCompare

[ Source](https://github.com/multiavatar/multiavatar-php)[ Packagist](https://packagist.org/packages/multiavatar/multiavatar-php)[ Docs](https://multiavatar.com)[ RSS](/packages/multiavatar-multiavatar-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (7)Used By (4)

Multiavatar
===========

[](#multiavatar)

[![](https://raw.githubusercontent.com/multiavatar/Multiavatar/main/logo.png?v=001)](https://raw.githubusercontent.com/multiavatar/Multiavatar/main/logo.png?v=001)

[Multiavatar](https://multiavatar.com) is a multicultural avatar generator.

In total, it is possible to generate **12,230,590,464** cryptographically unique avatars.

Initially coded in JavaScript, this version of Multiavatar is re-created in PHP. It can be used in PHP-based backend environments.

For more details about the Multiavatar Generator, please refer to the readme available in the JS [repository](https://github.com/multiavatar/Multiavatar).

### Installation

[](#installation)

If you don't use composer, just include `Multiavatar.php` in your application.

```
require_once('Multiavatar.php');

```

Via Composer:

```
composer require multiavatar/multiavatar-php
```

### Usage

[](#usage)

```
$multiavatar = new Multiavatar();
$svgCode = $multiavatar("Binx Bond", null, null);

```

For advanced usage, pass boolean `true` as the second parameter if you wish to generate an avatar without the environment part.

Pass an associative array as the third parameter to generate a specific avatar version.

```
$multiavatar = new Multiavatar();
$avatarId = "ANY_STRING";
$svgCode = $multiavatar($avatarId, true, array("part" => "11", "theme" => "C"));

```

### API

[](#api)

This PHP script is powering the [Multiavatar API](https://api.multiavatar.com).

To get an avatar as SVG code, add the avatar's ID to the URL:

```
https://api.multiavatar.com/Binx Bond

```

JavaScript API call example to get SVG code:

```
let avatarId = 'Binx Bond'
fetch('https://api.multiavatar.com/'
+JSON.stringify(avatarId))
  .then(res => res.text())
  .then(svg => console.log(svg))

```

To get an avatar as SVG file, add .svg to the end of the URL:

```
https://api.multiavatar.com/Binx Bond.svg

```

To get an avatar as PNG file, add .png to the end of the URL:

```
https://api.multiavatar.com/Binx Bond.png

```

### Testing

[](#testing)

To catch bugs, the representation of tests should be visual because not all bugs have programmatic errors. For example, if an equal length color array is mixed, or a double semicolon appears in a color string, in such cases an error is not thrown, but the visual representation of avatar(-s) becomes broken.

There are two types of tests, currently available in `index.php` and `other.php` files. Simply load these files in your browser from your PHP web server.

In the `index.php` file, visually presented are all 48 base versions or avatars. If all 48 base versions are good, then it means that all 12 billion are also good, because the 12 billion are constructed from different parts of the 48 base versions. All avatars in this file should look exactly the same as in the JavaScript repository's `\svg\index.html` file.

In the `other.php` file, additional various tests are performed to test different approaches how to generate avatars, specific avatar versions, or some repository-specific cases.

### Contributors

[](#contributors)

Ignace Nyamagana Butera ([@nyamsprod](https://github.com/nyamsprod))

### License

[](#license)

You can use Multiavatar for free, as long as the conditions described in the [LICENSE](https://multiavatar.com/license) are followed.

### Screenshots

[](#screenshots)

[![](https://camo.githubusercontent.com/86060dbe54df4acc5205149cf1b943d149acc907e37d97eeafab510a9f220c70/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30322e706e673f763d303031)](https://camo.githubusercontent.com/86060dbe54df4acc5205149cf1b943d149acc907e37d97eeafab510a9f220c70/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30322e706e673f763d303031)

[![](https://camo.githubusercontent.com/2a2aa4965513fd456060ee9ea60245d541130a5bd5d27f2750fa68d153201b4d/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30332e706e673f763d303031)](https://camo.githubusercontent.com/2a2aa4965513fd456060ee9ea60245d541130a5bd5d27f2750fa68d153201b4d/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30332e706e673f763d303031)

[![](https://camo.githubusercontent.com/73d5b35a978dea3f1d6fa7b8cff421b49ad5aafa9b61d76a91c28a0ddc4d6fe0/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30392e706e673f763d303031)](https://camo.githubusercontent.com/73d5b35a978dea3f1d6fa7b8cff421b49ad5aafa9b61d76a91c28a0ddc4d6fe0/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d30392e706e673f763d303031)

[![](https://camo.githubusercontent.com/851817f12b4916866b4d1b2339e35fb335c733ac8baeb0b6afa91a4101fef93e/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d31302e706e673f763d303031)](https://camo.githubusercontent.com/851817f12b4916866b4d1b2339e35fb335c733ac8baeb0b6afa91a4101fef93e/68747470733a2f2f6d756c74696176617461722e636f6d2f70726573732f696d672f73637265656e73686f74732f73637265656e73686f742d31302e706e673f763d303031)

### More info

[](#more-info)

For additional information and extended functionality, visit the [multiavatar.com](https://multiavatar.com) web-app.

The app is based on static html for the home page, and on Laravel 8 + Vue.js for extended functionality, including the web store.

The product mockup generator for the [Merch Maker](https://multiavatar.com/merch-maker) is based on the ImageMagick PHP library.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity58

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 ~15 days

Total

6

Last Release

1925d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c11504129d2dfdbfced6c9a692000e5d7167b0282542413de312fdb0bdf6933?d=identicon)[multiavatar](/maintainers/multiavatar)

---

Top Contributors

[![giekaton](https://avatars.githubusercontent.com/u/14371026?v=4)](https://github.com/giekaton "giekaton (17 commits)")

---

Tags

avataravatar-generatoravatar-makerimagegeneratorprofilecreatoravatarpicturemaker

### Embed Badge

![Health badge](/badges/multiavatar-multiavatar-php/health.svg)

```
[![Health](https://phpackages.com/badges/multiavatar-multiavatar-php/health.svg)](https://phpackages.com/packages/multiavatar-multiavatar-php)
```

###  Alternatives

[lasserafn/php-initial-avatar-generator

A package to generate avatars with initials for PHP

4454.3M15](/packages/lasserafn-php-initial-avatar-generator)[yzalis/identicon

Generate unique identicon avatars from any string

6091.1M23](/packages/yzalis-identicon)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16644.1k2](/packages/gravatarphp-gravatar)[sitegeist/sms-responsive-images

Provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.

34508.8k3](/packages/sitegeist-sms-responsive-images)[spacecatninja/imager-x

Ninja powered image transforms.

29399.9k34](/packages/spacecatninja-imager-x)[dantsu/php-image-editor

PHP library to easily edit image with GD extension.

34167.0k2](/packages/dantsu-php-image-editor)

PHPackages © 2026

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