From f61771db092ef1a70cfefce7dd776cacf1ef1b9e Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Thu, 31 Dec 2015 17:23:41 -0800 Subject: [PATCH] Made avatars local-environment-friendly. --- app/Library/Gravatar.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Library/Gravatar.php b/app/Library/Gravatar.php index f25a2d0d..1b74532e 100644 --- a/app/Library/Gravatar.php +++ b/app/Library/Gravatar.php @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -use Illuminate\Support\Facades\URL; - class Gravatar { public static function getUrl($email, $size = 80, $default = null, $rating = 'g') @@ -40,7 +38,10 @@ class Gravatar } } - $url .= "&d=" . urlencode(URL::to('/images/icons/profile_' . $size . '.png')); + // Pony.fm's production URL is hardcoded here so Gravatar can + // serve functioning default avatars in the dev environment, + // which it won't be able to access. + $url .= "&d=" . urlencode(URL::to('https://pony.fm/images/icons/profile_' . $size . '.png')); } return $url;