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
Laravel Gravatar

Laravel Gravatar Laravel Package

forxer/laravel-gravatar

Laravel Gravatar makes it easy to generate Gravatar avatar URLs in Laravel apps, with configurable default images, sizes, ratings, and secure email hashing. Simple helpers and a facade keep avatar integration clean and flexible.

View on GitHub
Deep Wiki
Context7

Easy Gravatar integration in a Laravel project.

Frequently asked questions about Laravel Gravatar
How do I install forxer/laravel-gravatar in a Laravel app?
Run composer require forxer/laravel-gravatar. Laravel package auto-discovery registers the service provider, so the facade and helper are immediately usable with sensible defaults. Publishing the config file is optional and only needed when you want to customize default image, size, or rating behavior.
Does forxer/laravel-gravatar support Laravel 13?
Yes. Release 4.4.0 adds Laravel 13 support to the 4.x branch, and the package targets Laravel 10 through 13 on PHP 8.x. A single major constraint such as ^4.4 can cover current and next framework upgrades without a package-side migration. Verify the illuminate/support constraint resolves against your pinned Laravel version during installation.
How do I configure the default avatar image, size, and rating?
Publish the package config file and set your preferred defaults for image size, rating, and fallback default image. The package is designed around configurable Gravatar URL parameters, so policy decisions live in configuration rather than scattered view code. Keep explicit defaults committed so avatar behavior is consistent across environments.
Is forxer/laravel-gravatar GDPR compliant or privacy-safe?
The package hashes the normalized email address with MD5 and places that hash in the Gravatar image URL, which is requested from gravatar.com. That is generally treated as pseudonymization rather than anonymization because the hash travels to a third-party CDN. Run a privacy review before using it in regulated or EU-facing contexts, and consider proxying or self-hosting avatars if your policy requires it.
What happens if Gravatar is unreachable or the user has no Gravatar?
When a user has no Gravatar, Gravatar itself serves the configured default image such as identicon, monsterid, mystery person, or a custom URL. If gravatar.com is unreachable, the package does not intercept the request because it only builds URLs. For production resilience, consider proxying avatar requests, caching images, or adding a local fallback in your view layer.
Does laravel-gravatar cache avatars or store images locally?
No. forxer/laravel-gravatar is a stateless URL builder and does not upload, store, cache, moderate, or manage avatar images. Any caching or local image hosting must be added separately through your HTTP cache, CDN, proxy, or application storage layer. Treat it as an avatar URL helper, not an avatar management system.
How do I test Gravatar URL generation in a Laravel application?
Unit-test your own small AvatarService wrapper and assert the generated URL contains the expected email hash, size, rating, and default image parameters. You do not need to call gravatar.com in tests because the package constructs URLs locally. Avoid calling the vendor facade directly from Blade views so URL construction and fallback behavior remain testable in one place.
What are alternatives to forxer/laravel-gravatar?
Alternatives include creativeorange/gravatar, Libravatar, a self-hosted avatar service, or an in-house Gravatar URL helper. The forxer package is intentionally thin and has a low transitive footprint, so forking or vendoring it is realistic if upstream maintenance changes. Wrapping the facade in an internal service keeps a future provider swap limited to one file.
Is forxer/laravel-gravatar actively maintained?
The 4.4.0 release adding Laravel 13 support indicates the maintainer is tracking framework releases on the 4.x branch. It is a single-maintainer project, so pin a major version such as ^4.4 and watch for framework-support releases. The codebase is small enough to fork or vendor if upstream activity slows.
Can I use laravel-gravatar without calling the facade directly?
Yes. You can call the helper or inject the underlying service, and the recommended approach is to wrap it in a small internal AvatarService. That keeps vendor-specific calls out of Blade views and gives you one place to enforce size, rating, and fallback policy. The wrapper also makes replacing the package with a proxy or self-hosted solution much easier later.
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