Skip to content

Commit b4adf28

Browse files
committed
Load a 256x256 or 128x128 thumbnail, depending on what thumbnails are available.
1 parent a2c0339 commit b4adf28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wcfsetup/install/files/lib/data/user/avatar/AvatarDecorator.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace wcf\data\user\avatar;
44

55
use wcf\data\file\File;
6+
use wcf\system\file\processor\UserAvatarFileProcessor;
67
use wcf\util\StringUtil;
78

89
/**
@@ -55,7 +56,8 @@ public function getSafeImageTag(?int $size = null): string
5556
public function getURL($size = null)
5657
{
5758
if ($this->avatar instanceof File) {
58-
$thumbnail = $this->avatar->getThumbnail($size ?? '');
59+
$thumbnail = $this->avatar->getThumbnail(UserAvatarFileProcessor::AVATAR_SIZE_2X)
60+
?? $this->avatar->getThumbnail(UserAvatarFileProcessor::AVATAR_SIZE);
5961
if ($thumbnail !== null) {
6062
return $thumbnail->getLink();
6163
}

0 commit comments

Comments
 (0)