Missing reset of the WebP flag for cover photos
authorAlexander Ebert <ebert@woltlab.com>
Fri, 7 Jan 2022 16:35:25 +0000 (17:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 7 Jan 2022 16:35:25 +0000 (17:35 +0100)
Uploading a GIF after uploading a cover photo with a WebP variant caused the GIF to not show up.

See https://www.woltlab.com/community/thread/293665-gif-bilder-als-titelbild/

wcfsetup/install/files/lib/system/upload/UserCoverPhotoUploadFileSaveStrategy.class.php

index aafe7c562ba82c070b3319666de7410b576417c2..126143d5f2c617d2b16fea7851293ef34434f489 100644 (file)
@@ -111,6 +111,7 @@ class UserCoverPhotoUploadFileSaveStrategy implements IUploadFileSaveStrategy
                 // always generate a new hash to invalidate the browser cache and to avoid filename guessing
                 'coverPhotoHash' => StringUtil::getRandomID(),
                 'coverPhotoExtension' => $uploadFile->getFileExtension(),
+                'coverPhotoHasWebP' => 0,
             ]);
 
             // force-reload the user profile to use a predictable code-path to fetch the cover photo