No need to pre-resize avatars
This commit is contained in:
parent
6e35544a67
commit
1431bbd884
|
@ -168,17 +168,6 @@ class Profile extends Managed_DataObject
|
||||||
return null;
|
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;
|
return $avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user