Example of Creativeorange/gravatar in realodix/urlhub

File composer.json (link to Github)
{
    "require": {
        "php": "^8.0",
        "codeitnowin/barcode": "^3.0",
        "creativeorange/gravatar": "~1.0",
        //
    }
}
File app/Models/User.php (link to Github)
use Creativeorange\Gravatar\Facades\Gravatar;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    public function getAvatarAttribute()
    {
        if (Gravatar::exists($this->email) == true) {
            return Gravatar::get($this->email);
        }
    }
}

Additional resources on creativeorange/gravatar: