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

AbandonedArchivedLibrary

sqin/gravatar
=============

Framework agnostic Gravatar library

1.0.2(11y ago)3311BSD-3-ClausePHPPHP &gt;=5.3.0

Since Nov 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/squareinsider/gravatar)[ Packagist](https://packagist.org/packages/sqin/gravatar)[ Docs](http://squareinsider.com)[ RSS](/packages/sqin-gravatar/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

\#Gravatar

[![Build Status](https://camo.githubusercontent.com/f110af310dcee4c02a37429370da16a68ca0d6e4b7dd4809c3d4fb7956eec57b/68747470733a2f2f7472617669732d63692e6f72672f737175617265696e73696465722f67726176617461722e706e67)](https://travis-ci.org/squareinsider/gravatar)[![Latest Stable Version](https://camo.githubusercontent.com/74f145425bbad26408ce5bb28a955bb7122552ccf0d07cc9e840c892430be8c2/68747470733a2f2f706f7365722e707567782e6f72672f7371696e2f67726176617461722f762f737461626c652e706e67)](https://packagist.org/packages/sqin/gravatar)[![Latest Unstable Version](https://camo.githubusercontent.com/a00a1d33d2fddef26494d311608f092c782bbf9a66cfd9fee5c70f60b3c413b6/68747470733a2f2f706f7365722e707567782e6f72672f7371696e2f67726176617461722f762f756e737461626c652e706e67)](https://packagist.org/packages/sqin/gravatar)

\##Description

The Gravatar package allows you to easily implement Gravatars in your application.

\##Methods

\###\_\_construct()

Creates a Gravatar instance.

```
$gravatar = new Gravatar();

```

\###factory()

Returns a Gravatar instance. Allows for method chaining right of the bat.

```
Gravatar::factory()->setSize(80)->getGravatar('user@example.org');

```

\###setSize(int $size)

Set the size of the Gravatar. Value must be between 1 and 512.

```
$gravatar->setSize(100);

```

\###getSize()

Returns the size of the Gravatar.

```
$gravatar->getSize();

```

\###setRating(string $rating)

Set the max rating of the Gravatar.

```
$gravatar->setRating('pg');

```

\###getRating()

Returns the rating of the Gravatar.

```
$gravatar->getRating();

```

\###setDefault(string $default)

Set the url to the default Gravatar.

```
$gravatar->setDefault('http://example.org/default_avatar.png');

```

\###getDefault()

Returns the urlencoded URL of the default Gravatar.

```
$gravatar->getDefault();

```

\###getUrl(string $email)

Returns the URL of the Gravatar.

```
$gravatar->getUrl('user@example.org');

```

\###getGravatar(string $email \[, array $attributes = array()\])

Returns Gravatar image tag.

```
$gravatar->getGravatar('user@example.org');

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

4177d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/773958?v=4)[Frederic G. Østby](/maintainers/freost)[@freost](https://github.com/freost)

---

Top Contributors

[![freost](https://avatars.githubusercontent.com/u/773958?v=4)](https://github.com/freost "freost (36 commits)")

---

Tags

gravatar

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sqin-gravatar/health.svg)](https://phpackages.com/packages/sqin-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.5M54](/packages/creativeorange-gravatar)[cebe/yii2-gravatar

Gravatar Widget for Yii 2

441.8M35](/packages/cebe-yii2-gravatar)[thomaswelton/gravatarlib

A lightweight PHP 5.3 OOP library providing easy gravatar integration.

251.1M5](/packages/thomaswelton-gravatarlib)[forxer/gravatar

A library providing easy gravatar integration.

35202.0k8](/packages/forxer-gravatar)[awcodes/filament-gravatar

Replace Filament's default avatar url provider with one for Gravatar.

31190.6k4](/packages/awcodes-filament-gravatar)

PHPackages © 2026

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