Laravel Get Gravatar Image Example

By Hardik Savani November 5, 2023 Category : Laravel

Hey Folks,

In this quick example, let's see laravel gravatar helper. let’s discuss about laravel gravatar image. let’s discuss about thomaswelton laravel gravatar. we will help you to give an example of gravatar laravel example.

Gravatar is a service that provide unique globally avatars and integrated it into their WordPress.com blogging platform. If you don't have avatar image then you can get Gravatar src image from thier email if it register on WordPress.com. So if you want to implement in your laravel application then it is very easy. There are several package for Gravatar image for laravel, but we will use creativeorange/gravatar package that is i think better.

First fire following command on your terminal.

Step 1: Installation creativeorange/gravatar Package

composer require creativeorange/gravatar

After install this package, Now open config/app.php file and add service provider and aliase.

config/app.php

'providers' => [

....

Creativeorange\Gravatar\GravatarServiceProvider::class

],

'aliases' => [

....

'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,

],

ok, now we can use Gravatar in our blade file like this way:

Use Gravatar In Blade File

<img src="{{ Gravatar::get('itsolutionstuff@gmail.com') }}">

Try this it will help you and for more information click here: laravel-gravatar.

I hope it can help you...

ge

Tags :
Shares