From 1431bbd884c53b15256bd7c2641c4455dfb84516 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 3 Jun 2014 01:52:42 +0200 Subject: [PATCH] No need to pre-resize avatars --- classes/Profile.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/classes/Profile.php b/classes/Profile.php index 961187bb93..74c2a4253c 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -168,17 +168,6 @@ class Profile extends Managed_DataObject return null; } - foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) { - // We don't do a scaled one if original is our scaled size - if (!($avatar->width == $size && $avatar->height == $size)) { - try { - Avatar::newSize($this, $size); - } catch (Exception $e) { - // should we abort the generation and live without smaller avatars? - } - } - } - return $avatar; }