PHPackages                             creativeorange/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. [Image &amp; Media](/categories/media)
4. /
5. creativeorange/gravatar

ActiveLibrary[Image &amp; Media](/categories/media)

creativeorange/gravatar
=======================

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

v1.0.26(1mo ago)5467.5M—2.7%5820MITPHPPHP &gt;=5.4.0

Since Mar 19Pushed 1mo ago8 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (29)Used By (20)

Gravatar for Laravel 5 - 12
===========================

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

[![Total Downloads](https://camo.githubusercontent.com/d7f8cdced49d42b6bf33fe25a123c298be27d7ef74eb191c1bfa4f9515b69eb0/68747470733a2f2f706f7365722e707567782e6f72672f63726561746976656f72616e67652f67726176617461722f642f746f74616c2e737667)](https://packagist.org/packages/creativeorange/gravatar)[![Latest Stable Version](https://camo.githubusercontent.com/589fdef0721dfab5fb8b7dadbfefaa0198db557185fe56648468dd31b6ef8300/68747470733a2f2f706f7365722e707567782e6f72672f63726561746976656f72616e67652f67726176617461722f762f737461626c652e737667)](https://packagist.org/packages/creativeorange/gravatar)[![License](https://camo.githubusercontent.com/9978ebca1035ad0e7a36f979ee194f3c9c4c4acebb01d6e91aef5be4395cee6f/68747470733a2f2f706f7365722e707567782e6f72672f63726561746976656f72616e67652f67726176617461722f6c6963656e73652e737667)](https://packagist.org/packages/creativeorange/gravatar)

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

[](#installation)

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

```
composer require creativeorange/gravatar ~1.0
```

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

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

Then include the service provider within (Laravel 5.3 or below) `app/config/app.php`.

```
'providers' => [
    'Creativeorange\Gravatar\GravatarServiceProvider'
];
```

If using Laravel 5.4, include service provider withing `config/app.php`

```
'providers' => [
    Creativeorange\Gravatar\GravatarServiceProvider::class
];
```

If you want to use the facade, add this to de bottom of `app/config/app.php`And, for convenience, add a facade alias to this same file at the bottom:

```
'aliases' => [
    'Gravatar' => 'Creativeorange\Gravatar\Facades\Gravatar',
];
```

If you are using Laravel 5.4 or greater, add as follows, add to `config/app.php`

```
'aliases' => [
    'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,
];
```

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

69

—

FairBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity66

Solid adoption and visibility

Community41

Growing community involvement

Maturity69

Established project with proven stability

 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

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09c2af1aacfc3f405a56c5532985cb3b18f44520f24d9e2345d3a66acfc610ea?d=identicon)[creativeorange](/maintainers/creativeorange)

---

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)")[![REBELinBLUE](https://avatars.githubusercontent.com/u/2143908?v=4)](https://github.com/REBELinBLUE "REBELinBLUE (3 commits)")[![tabacitu](https://avatars.githubusercontent.com/u/1032474?v=4)](https://github.com/tabacitu "tabacitu (2 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/creativeorange-gravatar/health.svg)

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

###  Alternatives

[laravolt/avatar

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

2.0k5.4M31](/packages/laravolt-avatar)[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[irazasyed/laravel-identicon

Laravel Identicon Package

2329.5k1](/packages/irazasyed-laravel-identicon)[ottaviano/faker-gravatar

Faker Gravatar image provider

1055.7k6](/packages/ottaviano-faker-gravatar)[spatie/laravel-og-image

Generate OG images for your Laravel app

305.2k](/packages/spatie-laravel-og-image)

PHPackages © 2026

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