PHPackages                             backpack/gravatar - 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. backpack/gravatar

ActiveLibrary

backpack/gravatar
=================

A Laravel Gravatar package for retrieving gravatar image URLs or checking the existance of an image.

v1.0.26(1mo ago)00MITPHPPHP &gt;=8.2.0

Since Mar 19Pushed 1mo agoCompare

[ Source](https://github.com/Laravel-Backpack/gravatar)[ Packagist](https://packagist.org/packages/backpack/gravatar)[ RSS](/packages/backpack-gravatar/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (29)Used By (0)

Gravatar for Laravel 12 &amp; 13
================================

[](#gravatar-for-laravel-12--13)

[![Total Downloads](https://camo.githubusercontent.com/3a5546be5cdcce93fb54b00b427478f47a0379d3afd7d5f510c09383bde0f37d/68747470733a2f2f706f7365722e707567782e6f72672f6261636b7061636b2f67726176617461722f642f746f74616c2e737667)](https://packagist.org/packages/backpack/gravatar)[![Latest Stable Version](https://camo.githubusercontent.com/92651ab3fd51509416269945ce94b9648517fb5f761cafdd65a2a22afebba72e/68747470733a2f2f706f7365722e707567782e6f72672f6261636b7061636b2f67726176617461722f762f737461626c652e737667)](https://packagist.org/packages/backpack/gravatar)[![License](https://camo.githubusercontent.com/0b155014bd32239b3d80a3b707b4046482ef2432e27eb2b20c501568ca142474/68747470733a2f2f706f7365722e707567782e6f72672f6261636b7061636b2f67726176617461722f6c6963656e73652e737667)](https://packagist.org/packages/backpack/gravatar)

> NOTE: This is a fork of . We had to fork it, to add Laravel 13 support. All the work is credited to the maintainers of that package.

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

[](#installation)

First, pull in the package through Composer via the command line:

```
composer require backpack/gravatar
```

or add the following to your composer.json file and run `composer update`.

```
"require": {
    "backpack/gravatar": "~1.0"
}
```

Finally, publish the config by running the `php artisan vendor:publish` command

Usage
-----

[](#usage)

Within your controllers or views, you can use

```
    Gravatar::get('email@example.com');
```

this will return the URL to the gravatar image of the specified email address. In case of a non-existing gravatar, it will return return a URL to a placeholder image. You can set the type of the placeholder in the configuration option `fallback`. For more information, visit [gravatar.com](https://docs.gravatar.com/api/avatars/images/#default-image)

Alternatively, you can check for the existence of a gravatar image by using

```
    Gravatar::exists('email@example.com');
```

This will return a boolean (`true` or `false`).

Or you can pass a url to a custom image using the fallback method:

```
    Gravatar::fallback('http://urlto.example.com/avatar.jpg')->get('email@example.com');
```

Configuration
-------------

[](#configuration)

You can create different configuration groups to use within your application and pass the group name as a second parameter to the `get`-method:

There is a default group in `config/gravatar.php` which will be used when you do not specify a second parameter.

If you would like to add more groups, feel free to edit the `config/gravatar.php` file. For example:

```
return array(
	'default' => array(
		'size'   => 80,
		'fallback' => 'mm',
		'secure' => false,
		'maximumRating' => 'g',
		'forceDefault' => false,
		'forceExtension' => 'jpg',
	),
	'small-secure' => array (
	    'size'   => 30,
	    'secure' => true,
	),
	'medium' => array (
	    'size'   => 150,
	)
);
```

then you can use the following syntax:

```
Gravatar::get('email@example.com', 'small-secure'); // will use the small-secure group
Gravatar::get('email@example.com', 'medium'); // will use the medium group
Gravatar::get('email@example.com', 'default'); // will use the default group
Gravatar::get('email@example.com'); // will use the default group
```

Alternatively, you could also pass an array directly as the second parameter as inline options. So, instead of passing a configuration key, you pass an array, which will be merged with the default group:

```
Gravatar::get('email@example.com', ['size'=>200]);
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance97

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~154 days

Recently: every ~285 days

Total

27

Last Release

46d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.0.26PHP &gt;=8.2.0

### Community

Maintainers

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

---

Top Contributors

[![jacotijssen](https://avatars.githubusercontent.com/u/8997440?v=4)](https://github.com/jacotijssen "jacotijssen (23 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![osaigbovoemmanuel1](https://avatars.githubusercontent.com/u/41326502?v=4)](https://github.com/osaigbovoemmanuel1 "osaigbovoemmanuel1 (3 commits)")[![tabacitu](https://avatars.githubusercontent.com/u/1032474?v=4)](https://github.com/tabacitu "tabacitu (3 commits)")[![REBELinBLUE](https://avatars.githubusercontent.com/u/2143908?v=4)](https://github.com/REBELinBLUE "REBELinBLUE (3 commits)")[![joshlewis](https://avatars.githubusercontent.com/u/226778?v=4)](https://github.com/joshlewis "joshlewis (1 commits)")[![mikeerickson](https://avatars.githubusercontent.com/u/183153?v=4)](https://github.com/mikeerickson "mikeerickson (1 commits)")[![rocramer](https://avatars.githubusercontent.com/u/4487988?v=4)](https://github.com/rocramer "rocramer (1 commits)")[![sburina](https://avatars.githubusercontent.com/u/10303819?v=4)](https://github.com/sburina "sburina (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![tobias-nitsche](https://avatars.githubusercontent.com/u/6302292?v=4)](https://github.com/tobias-nitsche "tobias-nitsche (1 commits)")[![unDemian](https://avatars.githubusercontent.com/u/2129455?v=4)](https://github.com/unDemian "unDemian (1 commits)")[![alvinwhite](https://avatars.githubusercontent.com/u/24863014?v=4)](https://github.com/alvinwhite "alvinwhite (1 commits)")[![usernotnull](https://avatars.githubusercontent.com/u/15612814?v=4)](https://github.com/usernotnull "usernotnull (1 commits)")[![andreybutov](https://avatars.githubusercontent.com/u/6799588?v=4)](https://github.com/andreybutov "andreybutov (1 commits)")[![bjhijmans](https://avatars.githubusercontent.com/u/59833909?v=4)](https://github.com/bjhijmans "bjhijmans (1 commits)")[![carlos3duardo](https://avatars.githubusercontent.com/u/2405236?v=4)](https://github.com/carlos3duardo "carlos3duardo (1 commits)")[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (1 commits)")

---

Tags

laravelgravataravatar

### Embed Badge

![Health badge](/badges/backpack-gravatar/health.svg)

```
[![Health](https://phpackages.com/badges/backpack-gravatar/health.svg)](https://phpackages.com/packages/backpack-gravatar)
```

###  Alternatives

[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[creativeorange/gravatar

A Laravel Gravatar package for retrieving gravatar image URLs or checking the existance of an image.

5467.5M53](/packages/creativeorange-gravatar)[arcanedev/gravatar

A library providing easy gravatar integration/generation (Laravel supported).

1986.8k](/packages/arcanedev-gravatar)

PHPackages © 2026

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