PHPackages                             gridprinciples/laravel-placeholder-avatars - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gridprinciples/laravel-placeholder-avatars

ActiveLibrary

gridprinciples/laravel-placeholder-avatars
==========================================

Serve SVG avatars from your Laravel application

v0.3.0(1y ago)2786↑350%[1 PRs](https://github.com/gridprinciples/laravel-placeholder-avatars/pulls)MITPHPPHP ^8.2CI passing

Since Aug 7Pushed 1y ago2 watchersCompare

[ Source](https://github.com/gridprinciples/laravel-placeholder-avatars)[ Packagist](https://packagist.org/packages/gridprinciples/laravel-placeholder-avatars)[ Docs](https://github.com/gridprinciples/laravel-placeholder-avatars)[ GitHub Sponsors]()[ RSS](/packages/gridprinciples-laravel-placeholder-avatars/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (7)Used By (0)

Serve SVG avatars from your Laravel application
===============================================

[](#serve-svg-avatars-from-your-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aa3cae656e291b73a978fa8fa05f3a9a480e0d44c0ac89ce1b239d52cde216c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677269647072696e6369706c65732f6c61726176656c2d706c616365686f6c6465722d617661746172732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gridprinciples/laravel-placeholder-avatars)[![GitHub Tests Action Status](https://camo.githubusercontent.com/33e47bd697d92d5d1c7ccd34b44a48a14cef6458ba158fca8eb9da8b080bf725/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f677269647072696e6369706c65732f6c61726176656c2d706c616365686f6c6465722d617661746172732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/gridprinciples/laravel-placeholder-avatars/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9f0fb6542c81c7d73f12abedfcd037a24a9982f547b43d1c1d687bff95e5d3c0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f677269647072696e6369706c65732f6c61726176656c2d706c616365686f6c6465722d617661746172732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/gridprinciples/laravel-placeholder-avatars/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1bcf3eb7649f4bb4d8cbddb0aeb471642a805c592fc42bc723045088d6623ab4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f677269647072696e6369706c65732f6c61726176656c2d706c616365686f6c6465722d617661746172732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gridprinciples/laravel-placeholder-avatars)

This package gets you several BoringAvatar designs rendered in your Laravel application as SVGs. They can be rendered via configurable URL or by direct usage of a Blade component.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require gridprinciples/laravel-placeholder-avatars
```

Usage
-----

[](#usage)

### Via URL

[](#via-url)

If you plan on rendering via URL, you must register it in your routes file:

```
// routes/web.php
use GridPrinciples\PlaceholderAvatars\Facades\PlaceholderAvatars;

PlaceholderAvatars::route('avatar.svg', type: 'beam');
```

By default, you can use query parameters to set the generation options. For example:

```
/avatar.svg?name=JohnDoe&square=1

```

...would generate the same face every time ("JohnDoe" as the seed) in a square format.

If you want to dictate which options are used in generation, you can supply these options when adding the route:

```
// routes/web.php
use GridPrinciples\PlaceholderAvatars\Facades\PlaceholderAvatars;

PlaceholderAvatars::route('face.svg',
    // which design should render (optional; defaults to "beam")
    type: 'marble',

    // enforce a red color scheme
    colors: ['#440000', '#110000', '#CC0000'],

    // force a circular avatar, a square will never be produced even if requested
    square: false,

    // we are rendering an SVG so this doesn't matter much, but you can set the size
    size: 256,
);
```

### Via component

[](#via-component)

You can also render the SVGs inline within any Blade component:

```

```

Avatars
-------

[](#avatars)

The following types from [BoringAvatars](https://boringavatars.com/playground) are currently supported:

- `beam`
- `marble`
- `pixel`

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [BoringDesigners](https://github.com/boringdesigners/) - for making some really good open-source avatars
- [Spatie](https://github.com/spatie) - for a great package skeleton
- [Greg Brock](https://github.com/gbrock)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance49

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Total

4

Last Release

376d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aba1078ca8f1e8c1a3b12e7e6bff28b3beb8a1a69715859cf459ddd7ae73cb44?d=identicon)[gbrock](/maintainers/gbrock)

---

Top Contributors

[![gbrock](https://avatars.githubusercontent.com/u/4151394?v=4)](https://github.com/gbrock "gbrock (16 commits)")

---

Tags

laravelGrid Principleslaravel-placeholder-avatars

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/gridprinciples-laravel-placeholder-avatars/health.svg)

```
[![Health](https://phpackages.com/badges/gridprinciples-laravel-placeholder-avatars/health.svg)](https://phpackages.com/packages/gridprinciples-laravel-placeholder-avatars)
```

###  Alternatives

[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[bilfeldt/laravel-request-logger

Log Laravel application request and responses for debugging or statistics

122163.3k2](/packages/bilfeldt-laravel-request-logger)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

1312.2k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
