Get Gravatar Image in Laravel 5.7 Example

Today, We want to share with you Get Gravatar Image in Laravel 5.7 Example.In this post we will show you Simple PHP Laravel Gravatar Function, hear for Loading Gravatar image from email using Laravel 5.7 we will give you demo and example for implement.In this post, we will learn about PHP Laravel Script to Get Gravatar Image using Email Address with an example.

Get Gravatar Image in Laravel 5.7 Example

There are the Following The simple About Get Gravatar Image in Laravel 5.7 Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop How to Get Gravatar Image Using Laravel, so the laravel,5,package,gravatar,avatar,image,src,code,img,tag,implement,example this example is following below.

There are lots of the packages are available to get or display Gravatar images but for this example We are going to use simple libs thomaswelton/laravel-gravatar package for Laravel project.so We can Use Laravel 5.7- load gravatar image using thomaswelton/laravel-gravatar package.

Step 1: Installation Package

First of all run You following command on your CMD terminal.

composer require thomaswelton/laravel-gravatar

Step 2: config/app.php

Now, You register add the service provider and its aliase in the config/app.php

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

Gravatar::src($add_email, $size = null, $rating = null) will return the Serever side Laravel complete URL for the Gravatar Images registered with your email address.

Last step We are ready to use it in Laravel application by following the simple way :

Step 3: Use In Blade File

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

or

<!-- Display image with default dimensions -->
<img src="{{ Gravatar::src('[email protected]') }}">
<!-- Display image at 200px -->
<img src="{{ Gravatar::src('[email protected]', 200) }}">

And lAST you Try this it will help step by step and for more Good information click here: laravel-gravatar

.

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Get Gravatar Image in Laravel 5.7 Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1.   How to check if file exists or not in Laravel 5?
  2.   VueJS Check duplicated value in array
  3.   Basic Computer Programming Languages Principles
  4.   Codeigniter MVC Tutorial Hello World
  5.   JQuery Remove combobox items(options) from DropDownList
  6.   How to Find the Document Root using PHP Script
  7.   Laravel 6 Required With All Validation Example
  8.   PHP and Ajax Asynchronous File Upload using jQuery
  9.   Redirecting a Web Folder Directory to another Directory in htaccess
  10.   How to Clear cache in Laravel 5.8?