tomshaw / laravel-gravatar
A zero config named parameter Laravel Gravatar Directive.
Installs: 3 198
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/tomshaw/laravel-gravatar
Requires
- php: ^8.2|^8.3|^8.4
- laravel/framework: ^10.0|^11.0|^12.0
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1
- orchestra/testbench: 9.x-dev
- pestphp/pest: 3.x-dev
- dev-master
- v0.2.0
- v0.1.2
- v0.1.1
- v0.1.0
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/github_actions/aglipanci/laravel-pint-action-2.6
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-6
- dev-release-please--branches--master
This package is auto-updated.
Last update: 2025-10-13 13:32:20 UTC
README
A zero config named parameter Laravel Gravatar Directive.
Installation
You can install the package via composer:
composer require tomshaw/laravel-gravatar
Usage
Configure the Gravatar Image where you plan on utilizing it.
<img src="@gravatar(email: 'email@example.com', size: 60, default: 'retro', rating: 'g')" />
This generates an
60pixelsretrostyle image with agrating.
Parameters
The default parameters are described below:
-
$email(string): The email address of the user. This is required. -
$size(int): The size of the Gravatar image in pixels. Default is60. Must be between1and2048. -
$default(string): The default image to display if the user doesn't have a Gravatar. Default is'mp'. Options include:'mp','identicon','monsterid','wavatar','retro','robohash','blank'. -
$rating(string): The rating of the Gravatar image. Default is'g'. Options include:'g','pg','r','x'. -
$secure(bool): Whether to use the secure Gravatar URL. Default istrue. -
$forceDefault(string): Whether to always load the default image. Default is'n'. -
$forceExtension(string): The file extension for the Gravatar image. Default is'jpg'.
Requirements
The package is compatible with PHP 8 or later.
License
The MIT License (MIT). See License File for more information.