Skip to content

dgillier/faker-gravatar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gravatar image provider for Faker

Build Status

It is Gravatar image provider for fzaninotto/Faker

Here are some examples of generated avatars:

mp (mode: mp)

identicon (mode: identicon)

monsterid (mode: monsterid)

wavatar (mode: wavatar)

retro (mode: retro)

robohash (mode: robohash)

blank (mode: blank, transparent image)

Requirements

  • PHP >= 7.1

Installation

composer require ottaviano/faker-gravatar --dev

Usage

<?php

// ...

$faker = Faker\Factory::create();
$faker->addProvider(new Ottaviano\Faker\Gravatar($faker));

$imageLocalPath = $faker->gravatar();
$imageContent = file_get_contents($imageLocalPath);

// OR

$imageUrl = $faker->gravatarUrl();

About

Gravatar image Faker provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%