diff --git a/lib/private/Metadata/Provider/ExifProvider.php b/lib/private/Metadata/Provider/ExifProvider.php index 02024bd3877be..8209fa6bd676a 100644 --- a/lib/private/Metadata/Provider/ExifProvider.php +++ b/lib/private/Metadata/Provider/ExifProvider.php @@ -68,7 +68,12 @@ public function execute(File $file): array { $size->setMetadata([]); if (!$data) { - $sizeResult = getimagesizefromstring($file->getContent()); + try { + $sizeResult = getimagesizefromstring($file->getContent()); + } catch (\Throwable $ex) { + $this->logger->warning("Couldn't get image for ".$file->getId(), ['exception' => $ex]); + $sizeResult = false; + } if ($sizeResult !== false) { $size->setMetadata([ 'width' => $sizeResult[0],