]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/ImageRepo.php
Merge branch 'master' into draw.io to fetch auth image changes
[bookstack] / app / Repos / ImageRepo.php
index 492834446262d115a5a23ee38a44baa652ba3f9c..3918d5f67c30b99ff45d14e89915fc4b9adf2ef5 100644 (file)
@@ -215,7 +215,6 @@ class ImageRepo
      * Get the thumbnail for an image.
      * If $keepRatio is true only the width will be used.
      * Checks the cache then storage to avoid creating / accessing the filesystem on every check.
-     *
      * @param Image $image
      * @param int $width
      * @param int $height
@@ -228,9 +227,9 @@ class ImageRepo
     {
         try {
             return $this->imageService->getThumbnail($image, $width, $height, $keepRatio);
-        } catch (FileNotFoundException $exception) {
-            $image->delete();
-            return [];
+        } catch (\Exception $exception) {
+            dd($exception);
+            return null;
         }
     }