Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Gravatar Bundle

Gravatar Bundle Laravel Package

philetaylor/gravatar-bundle

A Symfony bundle for integrating Gravatar avatars into your application. It provides Twig helpers to generate Gravatar URLs with configurable size, rating, and default image settings, making it easy to display consistent user profile images across your site. Simple installation and configuration.

View on GitHub
Deep Wiki
Context7

FORKED!!! This bundles provides a Gravatar API various utilities to work with it in templates

Frequently asked questions about Gravatar Bundle
Is philetaylor/gravatar-bundle a Laravel package?
No. It is a Symfony bundle for Gravatar avatar URL generation, with Symfony dependency-injection configuration and Twig helpers rather than Laravel service providers, facades, or Blade directives. Laravel will not auto-wire it, so using it would require an adapter or wrapper. For most Laravel applications, an internal Gravatar URL service is simpler and lower risk.
How do I install philetaylor/gravatar-bundle in a Laravel app?
You can try installing it with Composer, but Laravel will not register the Symfony bundle automatically. You would need to confirm the canonical Packagist name, verify autoloading under the Ornicar\GravatarBundle namespace, and build your own service provider or adapter if you keep it. Because direct integration is not supported, many teams choose to reimplement the small URL-building logic instead.
Does this Gravatar bundle support Laravel 10 or Laravel 11?
There is no Laravel-specific support declared for this Symfony bundle. Its release notes track Symfony internals, including Symfony 7.1 dependency-injection deprecations, so its design center is Symfony rather than Laravel. You must re-check its PHP and Symfony Composer constraints against your Laravel version before relying on it.
What does the Gravatar bundle actually do?
It provides Gravatar API utilities and Twig helpers to generate avatar URLs with configurable size, rating, default image, and related display options. The core value is URL construction from an email hash and display parameters, not a complex server-side Gravatar API client. That small capability is why a framework-specific dependency may be unnecessary in Laravel.
Can I reuse its Gravatar URL builder without Symfony dependency injection?
Possibly, but only if the bundle’s URL-building class is loosely coupled and can be instantiated without Symfony container services. Inspect the code first, then wrap it behind your own AvatarProvider contract if it is clean enough. If it pulls in Symfony DI or Twig assumptions, reimplementing the URL builder is usually lower risk.
How do I create a Laravel Blade component for Gravatar avatars?
Create a small service that normalizes the email, hashes it with md5, and builds a Gravatar URL with parameters such as s, r, d, and f, using HTTPS and proper URL encoding. Then expose it through a Blade component or helper so views do not scatter md5 calls and Gravatar query strings. Add fallback handling for missing or invalid email addresses and test the generated URLs.
What are the privacy and CSP concerns with Gravatar in Laravel?
Gravatar URLs expose an MD5 hash of the user’s email address to the browser and to Gravatar’s servers, which can be a privacy or GDPR concern. You should also account for third-party image requests in your Content Security Policy, especially img-src rules. If those risks matter, proxy avatars, cache them locally, or provide a local fallback instead of loading Gravatar directly.
Is philetaylor/gravatar-bundle maintained and safe for production?
The package shows active maintenance through Symfony 7.1 deprecation fixes, which is a positive signal, but it has a small footprint and low dependents. Runtime risk is relatively low because Gravatar integration is mostly URL construction, not a complex API. Still verify test coverage, supported PHP and Symfony ranges, and the canonical package identity before using it in production.
What are good Laravel alternatives to this Symfony Gravatar bundle?
For Laravel, the safest alternative is a small internal AvatarProvider service plus a Blade component that generates Gravatar URLs consistently. You can also use a Laravel-oriented Gravatar package, local avatar storage, or generated placeholder services such as UI Avatars. Avoid importing Symfony DI extensions into Laravel just to build avatar URLs.
How should I test Gravatar integration in a Laravel application?
Test email normalization and hashing, URL parameter encoding for size, rating, default image, and force-default options, plus fallback behavior for missing or invalid emails. Confirm that URLs use HTTPS and that your Blade component renders expected output without making network calls if you only generate URLs. Also test CSP or privacy-related behavior when avatars are loaded from Gravatar’s domain.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle