PHPackages                             fastre/libravatar-bundle - 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. [API Development](/categories/api)
4. /
5. fastre/libravatar-bundle

ActiveLibrary[API Development](/categories/api)

fastre/libravatar-bundle
========================

A simple implementation of Libravatar into Symfony

01321PHP

Since Sep 7Pushed 12y ago1 watchersCompare

[ Source](https://github.com/julienfastre/LibravatarBundle)[ Packagist](https://packagist.org/packages/fastre/libravatar-bundle)[ RSS](/packages/fastre-libravatar-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

LibravatarBundle
================

[](#libravatarbundle)

This bundle offers the support of the \[Libravatar service\] () for your Symfony's web apps.

Libravatar is an open-source alternative for Gravatar, offering more features and respect for privacy.

The service is federated and everyone may run his own instance of the service. The DNS Records indicate which instance of libravatar should be used to show the avatars'pictures.

This bundle is an implementation of the Melissa Draper's PEAR package ([http://pear.php.net/package/Services\_Libravatar/](http://pear.php.net/package/Services_Libravatar/)). It interrogates DNS Records and compose the URL's avatar with the result of the records.

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

[](#installation)

Add `"fastre/libravatar-bundle": "dev-master"` to your require's section of your composer.json file, like this:

```
    "require": {
        "fastre/libravatar-bundle": "*@dev"
    }

```

Then, add the bundle to your AppKernel's file :

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            //...
            new Fastre\LibravatarBundle\FastreLibravatarBundle(),
        );

        // etc.

        return $bundles;
    }

```

Usage
-----

[](#usage)

Call the Libravatar's service into your script and use the method

```
$libravatarService = $container->get('libravatar.provider');

$avatarUrl = $libravatarService->getUrl('email@example.com');

```

(In a controller, you may call the service with `$this->get('libravatar.provider');`.

Some options may be used to improve url :

- `'https'` (bool)
- `'algorithm'` (string `'md5'` or `'sha512'`)
- `'size'` (int)
- `'default'` for the default image :
    - "404" - give a "404 File not found" instead of an image
    - "mm"
    - "identicon"
    - "monsterid"
    - "wavata

Example:

```
$libravatarService = $container->get('libravatar.provider');

$options = array('https' => true, 'algorithm' => 'sha512', 'size' => 200);

$avatarUrl = $libravatarService->getUrl('email@example.com', $options);

```

Further development
-------------------

[](#further-development)

- I am planning to use PHP-APC to improve the rapidity of the bundle, and avoid to repeat DNS queries.
- I am thinking about replacing the 'https' option by the scheme from the symfony kernel.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a70a668b9796ac8bdfc4bc23e86d9d0e37e843d96b3cc80d4174558ef2577c8?d=identicon)[julienfastre](/maintainers/julienfastre)

---

Top Contributors

[![julienfastre](https://avatars.githubusercontent.com/u/345600?v=4)](https://github.com/julienfastre "julienfastre (19 commits)")

### Embed Badge

![Health badge](/badges/fastre-libravatar-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/fastre-libravatar-bundle/health.svg)](https://phpackages.com/packages/fastre-libravatar-bundle)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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