]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageService.php
Updated minimum php version from 7.3 to 7.4
[bookstack] / app / Uploads / ImageService.php
index 7243feeb0ec0fa1c23cad6fced69015e90d6fc4d..e755be7e6e7c261adfd8e49ef1d344957983013f 100644 (file)
@@ -3,7 +3,6 @@
 namespace BookStack\Uploads;
 
 use BookStack\Exceptions\ImageUploadException;
-use BookStack\Util\WebSafeMimeSniffer;
 use ErrorException;
 use Exception;
 use Illuminate\Contracts\Cache\Repository as Cache;
@@ -240,6 +239,7 @@ class ImageService
         }
 
         $initialHeader = substr($imageData, 0, strpos($imageData, 'IDAT'));
+
         return strpos($initialHeader, 'acTL') !== false;
     }
 
@@ -274,6 +274,7 @@ class ImageService
         $storage = $this->getStorageDisk($image->type);
         if ($storage->exists($this->adjustPathForStorageDisk($thumbFilePath, $image->type))) {
             $this->cache->put($thumbCacheKey, $thumbFilePath, 60 * 60 * 72);
+
             return $this->getPublicUrl($thumbFilePath);
         }
 
@@ -282,6 +283,7 @@ class ImageService
         // Do not resize apng images where we're not cropping
         if ($keepRatio && $this->isApngData($image, $imageData)) {
             $this->cache->put($thumbCacheKey, $image->path, 60 * 60 * 72);
+
             return $this->getPublicUrl($image->path);
         }