NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2949 most downloaded on Packagist
A package to generate avatars with initials for PHP
Latest stable
4.2.1
Last release 1 years ago
06 Oct 2025
Release timing varies
gaps range from 4 weeks to 2.6 years
Some releases are documented
notes for 14 of 35 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
35 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Cleaned up the base and tests. Added support for switching driver from GD to Imagick, and back.
Cleaned up the base and tests. Added support for switching driver from GD to Imagick, and back.
Removed caching method entirely.
This is considered a minor BC because of parameter renaming.
fixed 3.0.0 bug.
Nothing published for this version
private => protected visibility
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Can now detect language/script and apply a font that supports that script/language.
Can now detect language/script and apply a font that supports that script/language.
Supported:
More will come, when more supporting fonts are found.
Will now *NOT* default to __DIR__ . $fontFile but instead use it as a fallback.
Will now NOT default to __DIR__ . $fontFile but instead use it as a fallback.
This also means you can specify in an integer for GD Internal fonts or a complete path. Current implementations should still work, as it will simply fallback to the old implementation if no font is found.
I found a way to solve the ugly circle when using rounded(). Now, by using smooth() as well, it will generate a avatar at 5x size (without text) and r
I found a way to solve the ugly circle when using rounded(). Now, by using smooth() as well, it will generate a avatar at 5x size (without text) and resize back after the circle has been created. Example below:
Before:
After:
As you can see, the text is unchanged but the circle is far smoother. Use this and supply a avatar double the size of the img tag, and you will get some crisp avatars. 👍
Double size of img tag: <img src="https://user-images.githubusercontent.com/2689341/30786641-77ea7f74-a179-11e7-97e9-318b86dc8f92.png" width="64" height="64" />
Smooth + double size of img tag: <img src="https://user-images.githubusercontent.com/2689341/30786643-7b2d92b6-a179-11e7-8bc5-224412f26e57.png" width="64" height="64" />
After seeing https://github.com/sybri/php56-initial-avatar-generator, I decided to add php 5.6 support. Thanks!
After seeing https://github.com/sybri/php56-initial-avatar-generator, I decided to add php 5.6 support. Thanks!
It's now possible to use Japanese letters, with a different font.
It's now possible to use Japanese letters, with a different font.
<?php
require_once 'vendor/autoload.php';
$avatar = new LasseRafn\InitialAvatarGenerator\InitialAvatar();
echo $avatar->font('/fonts/NotoSans-Medium.otf')
->generate('こんにちは')
->stream('data-url');
Font sizes are a percentage of the image size. Example: 0.5 = 50% of image size.
Font sizes are a percentage of the image size. Example: 0.5 = 50% of image size.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Can now generate rounded images, however you should default to using border-radius using CSS instead.
Can now generate rounded images, however you should default to using border-radius using CSS instead.
I've fixed some stuff, added some docblocks, written more tests and setup monitoring and more.
I've fixed some stuff, added some docblocks, written more tests and setup monitoring and more.
Nothing published for this version
Lets say you want to have single letter initials, or maybe even three letters? Well thats possible!
Lets say you want to have single letter initials, or maybe even three letters? Well thats possible!
$avatar->name('Michael Burbon Hansen')->length(3)->generate(); // MBH
Nothing published for this version
Nothing published for this version
docs:add webpage usage example to documentation by @IamMutevu in https://github.com/LasseRafn/php-initial-avatar-generator/pull/65
Full Changelog: https://github.com/LasseRafn/php-initial-avatar-generator/compare/4.4...4.5
Fix: Compile Error: Cannot use lexical variable $font as a parameter name in InitialAvatar.php by @tomStory9 in https://github.com/LasseRafn/php-initi
Compile Error: Cannot use lexical variable $font as a parameter name in InitialAvatar.php by @tomStory9 in https://github.com/LasseRafn/php-initial-avatar-generator/pull/64Full Changelog: https://github.com/LasseRafn/php-initial-avatar-generator/compare/4.3...4.4
Fix dynamic property in InitialAvatar (PHP 8.2 deprecation) by @LeSuisse in https://github.com/LasseRafn/php-initial-avatar-generator/pull/59
Full Changelog: https://github.com/LasseRafn/php-initial-avatar-generator/compare/4.2.1...4.3
Nothing published for this version
One column per quarter.