Download the PHP package pyrrah/gravatar-bundle without Composer
On this page you can find all versions of the php package pyrrah/gravatar-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pyrrah/gravatar-bundle
More information about pyrrah/gravatar-bundle
Files in pyrrah/gravatar-bundle
Package gravatar-bundle
Short Description The simple way to use Gravatar API for Symfony 6 and Symfony 7
License MIT
Homepage https://github.com/Pyrrah/GravatarBundle
Informations about the package gravatar-bundle
Pyrrah/GravatarBundle 🤳
This bundle allows you to display your avatar anywhere on your site, via the Gravatar service.
Requirements
- Symfony 6.4 to 7.x
- PHP 8.1 or higher
- A Gravatar account - it's free!
Installation
-
To install this bundle, run the following Composer command :
- If you always have some default for your gravatars such as size, rating or default it can be configured in your config :
[!NOTE] The format option is specific to the bundle to choose the output format :
- url (default) : returns the https URL of the Gravatar image
- base64 : returns a base64-formatted image generated from the Gravatar URL
By using the "base64" option, you hide from your users the email hash used in the Gravatar URL.
Usage
All you have to do is use the helper like this example:
Or with parameters:
The only required parameter is the email adress. The rest have default values.
If you use twig you can use the helper like this example:
Or if you want to check if a gravatar email exists:
Or with parameters:
For more information look at the gravatar implementation pages.
Credits
- Pierre-Yves Dick
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of gravatar-bundle with dependencies
symfony/framework-bundle Version ^6.4|^7.0
symfony/templating Version ^6.4|^7.0