Merge pull request #58322 from nextcloud/backport/58003/stable32

This commit is contained in:
Kate 2026-03-03 08:01:13 +01:00 committed by GitHub
commit 69a95e4c42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -202,8 +202,6 @@ class ImageManager {
}
public function updateImage(string $key, string $tmpFile): string {
$this->delete($key);
try {
$folder = $this->getRootFolder()->getFolder('images');
} catch (NotFoundException $e) {
@ -217,6 +215,8 @@ class ImageManager {
throw new \Exception('Unsupported image type: ' . $detectedMimeType);
}
$this->delete($key);
if ($key === 'background') {
if ($this->shouldOptimizeBackgroundImage($detectedMimeType, filesize($tmpFile))) {
try {