New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

asbiin/laravel-adorable

Generate an Adorable Avatar for Laravel
79,830 4
Install
composer require asbiin/laravel-adorable
Latest Version:1.3.0
PHP:^7.4 || ^8.0
Laravel:8 – 11
License:MIT
Last Updated:Nov 10, 2025
Links: GitHub  ·  Packagist
Maintainer: asbin

Adorable Avatar for Laravel

LaravelAdorable is an library to generate nice avatars on Laravel.

Latest Version Downloads Workflow Status Quality Gate Coverage Status

avatar1

Installation

You may use Composer to install this package into your Laravel project:

composer require asbiin/laravel-adorable

You don't need to add this package to your service providers.

Support

This package supports Laravel 8 and newer, and has been tested with php 7.4 and newer versions.

Configuration

You can publish the LaravelAdorable configuration in a file named config/adorable.php. Just run this artisan command:

php artisan vendor:publish --tag="laraveladorable-config"

This package depends on intervention/image. It requires one of the following image libraries:

  • GD Library (>=2.0)
  • or: Imagick PHP extension (>=6.5.7)

You can configure the image library to use in the driver setting of the config/adorable.php file.

Usage

Use LaravelAdorable facade to generate avatar:

use Illuminate\Support\Str;
use LaravelAdorable\Facades\LaravelAdorable;

…

  $size = 200;
  $hash = Str::uuid()->toString();
  $dataUrl = LaravelAdorable::get($size, $hash);
  // $dataUrl: "data:image/png;base64,..."

This generates a base64 data-url content, like data:image/png;base64,….

You can display a data-url in html with:

  <img src="https://raw.githubusercontent.com/asbiin/laravel-adorable/HEAD/{{ $dataUrl }}" alt="avatar" />

License

Author: Alexis Saettler

Copyright © 2022.

Licensed under the MIT License. View license.

Inspiration

This work is mainly inspired by itsthatguy/avatars-api-middleware (MIT License).

Images resources are Copyright (c) 2014 Adorable IO LLC.

Related Packages

valorin/random

Random is a simple helper package designed to make it easy to generate a range o...

413,065 233
php
cline/variable-keys

Laravel Blueprint macros for variable primary key and morph types

22,912 0
php
cline/struct

Lean, attribute-driven Laravel data objects with explicit validation and Eloquen...

17,788 0
php
cline/toggl

Advanced feature flag management with strategies, time bombs, and groups

12,171 0
php
cline/sequencer

Sequential migration and operation orchestration for Laravel

11,736 0
php

Version History

Version Released PHP Laravel License
1.3.0 ^7.4 || ^8.0 ^8.0 || ^9.0 || ^10.0 || ^11.0 MIT
1.2.0 ^7.4 || ^8.0 ^8.0 || ^9.0 || ^10.0 MIT
1.1.1 ^7.4 || ^8.0 ^8.0 || ^9.0 MIT
1.1.0 ^7.4 || ^8.0 ^8.0 || ^9.0 MIT
1.0.1 ^7.4 || ^8.0 || ^8.1 ^8.78 MIT