// will be 96 pixels wide.
$image = $avatar->width(96)->generate();
// will be 96 pixels tall.
$image = $avatar->height(96)->generate();
// will be 96x96 pixels.
$image = $avatar->size(96)->generate();
// will be red
$image = $avatar->background('#ff0000')->generate();
// will be red
$image = $avatar->color('#ff0000')->generate();
// Will choose a background color based on `name` and a contrasting font color. The color for a specific name will always be the same.
$image = $avatar->autoColor()->generate();
// will be Semibold
$image = $avatar->font('/fonts/OpenSans-Semibold.ttf')->generate();
// note that we
// 1) use glyph() instead of name
// 2) change the font to FontAwesome!
return $avatar->glyph('f007')
->font('/fonts/FontAwesome5Free-Regular-400.otf')
->color('#fff')
->background('#ff0000')
->generate()
->stream('png', 100);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.