1. Go to this page and download the library: Download tal7aouy/avatar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tal7aouy / avatar example snippets
use Tal7aouy/Avatar\Avatar;
$avatar = new Avatar('Mhammed Talhaouy');
// Square Shape, Size 64px
$avatar = new Avatar('Mhammed Talhaouy', 'square', 64);
// Save Image As PNG/JPEG
$avatar->saveAs('path/to/filename');
$avatar->saveAs('path/to/filename', Avatar::MIME_TYPE_JPEG);
html
<img src=" echo $avatar
html
<img src=" echo $avatar->setColor('#000000', '#ffffff');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.