From: Cyperghost Date: Wed, 18 Dec 2024 10:15:22 +0000 (+0100) Subject: Add thumbnail X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eea4e06a2ce9923a523d38e90bfcc585d3e21458;p=GitHub%2FWoltLab%2FWCF.git Add thumbnail --- diff --git a/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php b/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php index 3c1083fdf8..0f4a1d50df 100644 --- a/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php +++ b/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php @@ -75,6 +75,7 @@ final class UserCoverPhotoAction implements RequestHandlerInterface ->singleFileUpload() ->bigPreview() ->simpleReplace() + ->thumbnailSize('small') ]); $form->markRequiredFields(false); diff --git a/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php b/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php index 1be6643af1..b5e7604a6d 100644 --- a/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php +++ b/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php @@ -213,4 +213,17 @@ final class UserCoverPhotoFileProcessor extends AbstractFileProcessor new ImageCropSize(UserCoverPhoto::MAX_WIDTH, UserCoverPhoto::MAX_HEIGHT) ); } + + #[\Override] + public function getThumbnailFormats(): array + { + return [ + new ThumbnailFormat( + 'small', + UserCoverPhoto::MIN_HEIGHT, + UserCoverPhoto::MIN_WIDTH, + false, + ), + ]; + } }