An open API service indexing awesome lists of open source software.

https://github.com/0xm4ze/avatar

👤 Generate user avatar using name initials letter.
https://github.com/0xm4ze/avatar

avatar avatar-generator avatars

Last synced: 3 months ago
JSON representation

👤 Generate user avatar using name initials letter.

Awesome Lists containing this project

README

          

# Avatar for PHP

Generate user avatar using name initials letter.

![Avatar](./demo/avatar.png)

## Features

- Data URI image ready (also save as PNG/JPG).
- Consistent color.
- Customize size, shape: square, circle.
- Small, fast.

## Install

Via Composer

```bash
$ composer require tal7aouy/avatar
```

### Implementation

```php
saveAs('path/to/filename');
$avatar->saveAs('path/to/filename', Avatar::MIME_TYPE_JPEG);

```

```html

```

To use static colour or custom colour use `->setColor($background, $foreground);`

```html

```

# License

**Avatar** is open-sourced software licensed under the [MIT license](LICENSE.md).