PHP code example of parsidev / gravatar

1. Go to this page and download the library: Download parsidev/gravatar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

parsidev / gravatar example snippets


"    "parsidev/gravatar": "5.6.x-dev"
},

Gravatar::exists($email)

Gravatar::saveImage($email, $destination, $size=null, $rating=null)

Gravatar::src($email, $size = null, $rating = null)

Returns the https URL for the Gravatar of the email address specified. Can optionally pass in the size [email protected]', 200) }}">

<!-- Show image at 512px scaled in HTML to 1024px -->
<img src="{{ Gravatar::src('[email protected]', 1024) }}" width=1024>

Gravatar::image($email, $alt = null, $attributes = array(), $rating = null)

Returns the HTML for an <img> tag

echo Gravatar::image('[email protected]');

// Show image at 200px
echo Gravatar::image('[email protected]', 'Some picture', array('width' => 200, 'height' => 200));

// Show image at 512px scaled in HTML to 1024px
echo Gravatar::image('[email protected]', 'Some picture', array('width' => 1024, 'height' => 1024));
config/app.php
config/app.php

'Gravatar'	=> 'Parsidev\Gravatar\Facades\Gravatar',

php artisan vendor:publish