creativeorange/gravatar
Laravel package for generating Gravatar URLs and image tags from email addresses. Configure size, default image, rating, and secure URLs, with helpers/facade for easy use in views and user profiles.
Gravatar::get()), reducing boilerplate and improving readability.profile, comment) for consistency across features like user profiles, comments, or team directories.Creativeorange\Gravatar\Facades\Gravatar) and publishes a config file, integrating seamlessly with Laravel’s service container.@gravatar('user@example.com')), though requires manual registration in AppServiceProvider.Gravatar::get() in APIs, then expand to Blade/frontends).Gravatar::hash($email, 'sha256')).identicon and mp fallbacks).tenant_{$id}_).@laravel-shift).setHashFunction)?shouldReceive(), but edge cases (e.g., rate limits) may need custom test doubles.Gravatar::exists() failures or integrating with Laravel’s monitoring (e.g., Sentry).Gravatar facade integrates natively with Laravel’s service container, requiring no additional setup beyond composer require.php artisan vendor:publish) for customization (e.g., default sizes, ratings, caching).@gravatar) aligns with Laravel’s templating but requires manual registration in AppServiceProvider.GravatarCached) for custom logic like cache invalidation.https://secure.gravatar.com/...), compatible with any frontend (React, Vue, vanilla JS).<img loading="lazy"> via standard URL responses.Phase 1: API Integration (Low Risk)
Gravatar::get().// Before
$url = "https://secure.gravatar.com/avatar/" . md5(strtolower(trim($email))) . "?s=150&d=identicon";
// After
$url = Gravatar::get($email, 'profile');
Phase 2: Frontend Integration (Medium Risk)
<!-- Before -->
<img src="https://secure.gravatar.com/avatar/{{ md5($user->email) }}?s=50">
<!-- After -->
<img src="{{ Gravatar::get($user->email, 'comment') }}">
default parameter to handle missing Gravatar accounts gracefully.Phase 3: Advanced Features (High Value)
'cache' => ['enabled' => true]) and test TTL settings.profile, comment) in config/gravatar.php.Phase 4: Monitoring and Optimization (Ongoing)
'debug' => true) to log Gravatar API responses.How can I help you explore Laravel packages today?