]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
No need to pre-resize avatars
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 2 Jun 2014 23:52:42 +0000 (01:52 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 2 Jun 2014 23:52:42 +0000 (01:52 +0200)
classes/Profile.php

index 961187bb93cb436135eac7159798f74914e5ecde..74c2a4253c6f8d6c34efddb72b8a2a270805ea40 100644 (file)
@@ -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;
     }