1. Go to this page and download the library: Download zertex/avatar-generator 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/ */
zertex / avatar-generator example snippets
$options = AvatarOptions::create()
->setFont('path to ttf font')
->setWidth(300)
->setFontSize(200)
->setTexturesFolder('path to textures folder')
->setImagesFolder('path to generated images folder')
->setImagesUrl('url to images folder')
->setSalt('random salt');