How to Implement Gravatar Image by using thomaswelton/laravel-gravatar Laravel?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today now here i will show you How to Implement Gravatar Image by using thomaswelton/laravel-gravatar Laravel? we are know that Gravatar is a service that is provide us unique globally avatars and also integrated it into their WordPress.com blogging platform. If we don’t have any avatar image then we can get Gravatar src image from there email if it is registered on WordPress.com. So if we want to implement in our laravel application then it is a very easy. There are some package for Gravatar image for laravel application. But here we will use thomaswelton/laravel-gravatar package that is because i think this is better for use.

So at first need to fire following command on our terminal.

Installation Package
composer require thomaswelton/laravel-gravatar

Sp after install this package, Now need to open config/app.php file and add the service provider and aliase.

config/app.php

'providers' => [
	....
	Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider::class,
],
'aliases' => [
	....
	'Gravatar' => Thomaswelton\LaravelGravatar\Facades\Gravatar::class
],

okay, now we can easily use Gravatar in our blade file as like as this way:

Use In Blade File
<img src="{{ Gravatar::src('[email protected]', 200) }}">

For try this it will help you and for the more information you can click here: laravel-gravatar.

Read Also: Generate Captcha code and Validation by using BotDetect package in laravel

Thanks for read. I hope it help you. For more you can follow us on facebook

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →