diff options
Diffstat (limited to 'lib/private/Metadata/Provider/ExifProvider.php')
-rw-r--r-- | lib/private/Metadata/Provider/ExifProvider.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Metadata/Provider/ExifProvider.php b/lib/private/Metadata/Provider/ExifProvider.php index 91c858f6794..2e1eb1d4208 100644 --- a/lib/private/Metadata/Provider/ExifProvider.php +++ b/lib/private/Metadata/Provider/ExifProvider.php @@ -25,6 +25,14 @@ class ExifProvider implements IMetadataProvider { $size->setMetadata([]); if (!$data) { + $sizeResult = getimagesizefromstring($file->getContent()); + if ($sizeResult !== false) { + $size->setMetadata([ + 'width' => $sizeResult[0], + 'height' => $sizeResult[1], + ]); + } + return [ 'size' => $size, ]; |