sfGravatarPlugin - 0.0.1

Gravatar Plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown

sfGravatarPlugin symfony plugin


Lets you easily use Gravatar from http://site.gravatar.com with a caching system


Step 1

    symfony plugin-install http://plugins.symfony-project.com/sfGravatarPlugin

    symfony cc

Step 2

Create a directory named g_cache in web/uploads and add full rights to it (note : you can change the directory's name but don't forget to change it in config file).

Step 3 (optional)

  • You can configure you gravatar plugin to your needs by adding the config above in your app.yml

  • You can copy the gravatar_default.png in your cache directory or create your


    <?php use_helper('Gravatar') ?>

    <?php echo gravatar_image_tag($email, $gravatar_rating = null, $gravatar_size = null) ?>

More information about rating and size on : http://site.gravatar.com

You can set some default option that are common for all of your gravatar in your app.yml

        default_size:   80
        default_rating: G
        default_image:  gravatar_default.png
        cache_dir_name: g_cache
        cache_expiration: 3 days # refer to strtotime() php function for more infos, but you can write 1 week, 1 year, whatever you want


For the full copyright and license information, please view the LICENSE file that was distributed with this source code.


  • automatically remove cached gravatar through a cron OR with phptask

  • add unit tests

Change log

  • 22.09.07 : initial release