https://github.com/alexeevdv/twig-gravatar-filter
Twig filter that converts email to Gravatar image url.
https://github.com/alexeevdv/twig-gravatar-filter
Last synced: about 2 months ago
JSON representation
Twig filter that converts email to Gravatar image url.
- Host: GitHub
- URL: https://github.com/alexeevdv/twig-gravatar-filter
- Owner: alexeevdv
- License: mit
- Created: 2018-12-04T13:22:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T16:09:31.000Z (over 6 years ago)
- Last Synced: 2025-02-04T22:27:26.774Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twig Gravatar filter
[](https://travis-ci.org/alexeevdv/twig-gravatar-filter)
[](https://codecov.io/gh/alexeevdv/twig-gravatar-filter)



This is Twig filter which converts email to Gravatar image url.
## Installation
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
Either run
```bash
$ composer require alexeevdv/twig-gravatar-filter "^1.0"
```or add
```
"alexeevdv/twig-gravatar-filter": "^1.0"
```to the ```require``` section of your `composer.json` file.
## Configuration
### Symfony
```
twig.extension.gravatar:
class: \alexeevdv\twig\GravatarFilter
tags:
- { name: twig.extension }
```### Standalone
```php
$twig->addExtension(new \alexeevdv\twig\GravatarFilter);
```## Usage
### Without parameters
```html
![]()
```### With different parameters
```html
![]()
```## Parameters
For possible values please refer to [Gravatar documentation](https://en.gravatar.com/site/implement/images/)