Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub repo size GitHub code size in bytes Packagist Downloads Packagist License Packagist Version Packagist PHP Version Support

GravatarUrl

This is a method for the get gravatar image most easily and, this library have a feature, if in gravatar no exists an image for user email returns default image with username initials.

You can test example in this link (https://gravatar-url.herokuapp.com/examples/LibraryUse.php).

Preview

Preview

Installation

$ composer require jruedaq/gravatar-url

Basic use

In your php file call autoload.php

require 'vendor/autoload.php';

getting a url image

$imageUrl = GetGravatar::getUrl(SessionData::get()->getFirstName(), SessionData::get()->getEmail(), 230);

Complete example

<?php
require 'vendor/autoload.php';

use jruedaq\GravatarUrl\GetGravatar;

$imageUrl = GetGravatar::getUrl("Juan David Rueda Quiroga", "jrueda@oneago.com", 230);
?>
<img src="<?php echo $imageUrl; ?>" alt="profile image">

About

Get Gravatar image URL and put by default an image with username initials. You can test this library here https://gravatar-url.herokuapp.com/examples/LibraryUse.php

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages