PHPackages                             mrgoodbytes8667/avatar-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. [Caching](/categories/caching)
4. /
5. mrgoodbytes8667/avatar-bundle

ActiveSymfony-bundle[Caching](/categories/caching)

mrgoodbytes8667/avatar-bundle
=============================

A Symfony bundle for avatar caching

v0.10.2(3y ago)01.8k[1 issues](https://github.com/mrgoodbytes8667/avatar-bundle/issues)CC-BY-NC-4.0PHPPHP ^8.1

Since Jun 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mrgoodbytes8667/avatar-bundle)[ Packagist](https://packagist.org/packages/mrgoodbytes8667/avatar-bundle)[ RSS](/packages/mrgoodbytes8667-avatar-bundle/feed)WikiDiscussions 0.11 Synced today

READMEChangelog (10)Dependencies (15)Versions (42)Used By (0)

avatar-bundle
=============

[](#avatar-bundle)

[![Packagist Version](https://camo.githubusercontent.com/4f816103ac502f8150148b4e5c5a264b3758024f215bc04ba02820f2f83869ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d72676f6f646279746573383636372f6176617461722d62756e646c653f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://packagist.org/packages/mrgoodbytes8667/avatar-bundle)[![PHP from Packagist](https://camo.githubusercontent.com/5a7c6e68d53dc9f813b313c76d60c7d504a9c09b1de40156caebe3208412ab82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d72676f6f646279746573383636372f6176617461722d62756e646c653f6c6f676f3d706870266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://packagist.org/packages/mrgoodbytes8667/avatar-bundle)[![Symfony Versions Supported](https://camo.githubusercontent.com/5f01fe7c8530b21caed0184548d265f8a1528a79cd7d7ff9520d87d07bd68363/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c6425324673796d666f6e792532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/5f01fe7c8530b21caed0184548d265f8a1528a79cd7d7ff9520d87d07bd68363/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c6425324673796d666f6e792532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)[![Symfony Versions Tested](https://camo.githubusercontent.com/ee98b01bcb84c20a8e9bca06da4e097a86afd916ac42be2f4a1ecbd8f19871b2/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c6425324673796d666f6e792d7465737425324625323533452532353344362e3225323532302532353343362e34266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/ee98b01bcb84c20a8e9bca06da4e097a86afd916ac42be2f4a1ecbd8f19871b2/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c6425324673796d666f6e792d7465737425324625323533452532353344362e3225323532302532353343362e34266c6f676f436f6c6f723d464646267374796c653d666c6174)[![Symfony LTS Version](https://camo.githubusercontent.com/b94a97914c05fd1dda47f9e82c19d83916b908700659f248a02c9199bd507ce9/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c642532466c74732532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/b94a97914c05fd1dda47f9e82c19d83916b908700659f248a02c9199bd507ce9/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c642532466c74732532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)[![Symfony Stable Version](https://camo.githubusercontent.com/5fb6c9f3d8dec984aead9fdc36e27b9e654c2dc5b119654bfa32d2fef36381be/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c64253246737461626c652532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/5fb6c9f3d8dec984aead9fdc36e27b9e654c2dc5b119654bfa32d2fef36381be/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c64253246737461626c652532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)[![Symfony Dev Version](https://camo.githubusercontent.com/1a2aa5f8f7757562d9b78c8546d6598ccffab09c08fbbe706bf839d964b95ca8/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c642532466465762532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/1a2aa5f8f7757562d9b78c8546d6598ccffab09c08fbbe706bf839d964b95ca8/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246736869656c64732e6d72676f6f6462797465732e646576253246736869656c642532466465762532462532353545362e32266c6f676f436f6c6f723d464646267374796c653d666c6174)[![Packagist License](https://camo.githubusercontent.com/3c5474b6a81a21981092a2450e86e6feaf57a310bd7aed08b05e5ae6eb698422/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d72676f6f646279746573383636372f6176617461722d62756e646c653f6c6f676f3d63726561746976652d636f6d6d6f6e73266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/3c5474b6a81a21981092a2450e86e6feaf57a310bd7aed08b05e5ae6eb698422/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d72676f6f646279746573383636372f6176617461722d62756e646c653f6c6f676f3d63726561746976652d636f6d6d6f6e73266c6f676f436f6c6f723d464646267374796c653d666c6174)
[![GitHub Workflow Status](https://camo.githubusercontent.com/e47f711ceb63994b9ce6878a19aca5ff07f96402812d2ae2fbcd731d33579759/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72656c656173652e796d6c3f6c6162656c3d737461626c65266c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/e47f711ceb63994b9ce6878a19aca5ff07f96402812d2ae2fbcd731d33579759/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72656c656173652e796d6c3f6c6162656c3d737461626c65266c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)[![GitHub Workflow Status](https://camo.githubusercontent.com/13782130743ece3d8271b153282fa0918df9e38c7d51934eba2a932b56923e19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72756e2d74657374732e796d6c3f6c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/13782130743ece3d8271b153282fa0918df9e38c7d51934eba2a932b56923e19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72756e2d74657374732e796d6c3f6c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)[![GitHub Workflow Status](https://camo.githubusercontent.com/ce77289c742a1b4bdc0178599a72933b1def21cf8bc1d811cd3399b289648452/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72756e2d74657374732d62792d76657273696f6e2e796d6c3f6c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://camo.githubusercontent.com/ce77289c742a1b4bdc0178599a72933b1def21cf8bc1d811cd3399b289648452/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d72676f6f646279746573383636372f6176617461722d62756e646c652f72756e2d74657374732d62792d76657273696f6e2e796d6c3f6c6f676f3d676974687562266c6f676f436f6c6f723d464646267374796c653d666c6174)[![codecov](https://camo.githubusercontent.com/7eaf4fcdcd24581876eb160683251296e31af7d2f16ad6e5a61014dd4dbe8620/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d72676f6f646279746573383636372f6176617461722d62756e646c652f302e31313f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d464646267374796c653d666c6174)](https://codecov.io/gh/mrgoodbytes8667/avatar-bundle)
A Symfony bundle for avatar caching

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

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### All applications

[](#all-applications)

Add the Multiavatar repo to your composer.json file.

```
"repositories": [
     {
       "type": "vcs",
       "url":  "https://github.com/bakame-php/multiavatar-php.git"
   }
]
```

### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require mrgoodbytes8667/avatar-bundle
```

### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

#### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require mrgoodbytes8667/avatar-bundle
```

#### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Bytes\AvatarBundle\BytesAvatarBundle::class => ['all' => true],
];
```

### All applications

[](#all-applications-1)

Create a routing file named `config\routes\bytes_avatar.yaml` with the content below, changing the `prefix` value to whatever you want the routes changed to.

```
_bytes_avatar:
  resource: '@BytesAvatarBundle/Resources/config/routing.php'
  prefix: /avatar
```

Create a config file named `config\packages\bytes_avatar.yaml` with the content below.

```
bytes_avatar:
  multiavatar: ~
```

Sample implementation for a User entity that already has a required email field:

```
