Created
March 7, 2020 05:36
-
-
Save biswajitpaul01/27d2ec51d9ca73e6d1b24743e78a8fdb to your computer and use it in GitHub Desktop.
Get avatar image from email address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('get_avatar')) { | |
function get_avatar ($email, $size = 32, $default = 'mp') { | |
return 'https://www.gravatar.com/avatar/' . md5($email) . '?' . http_build_query( [ 's' => $size, 'd' => $default ] ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment