diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php
index 0cd60dc..510a2dd 100644
--- a/app/Http/Controllers/PublicController.php
+++ b/app/Http/Controllers/PublicController.php
@@ -23,6 +23,7 @@ class PublicController extends BaseController
const SIZE_SMALL = 300;
const SIZE_MEDIUM = 600;
const SIZE_BIG = 1200;
+ const SIZE_PIXEL = 100;
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
public function listGalleriesView($name) {
@@ -107,6 +108,15 @@ class PublicController extends BaseController
return Storage::disk('cache')->response($cacheName."_big");
}
+ if($size == "pixel") {
+ $start = microtime(true);
+ $image = ImageResize::createFromString($file);
+ $image->resizeToLongSide(self::SIZE_BIG);
+ Storage::disk("cache")->put($cacheName."_pixel", $image->getImageAsString());
+ $ende = microtime(true);
+ Log::info("Dauer umwandlung pixel: ".($ende-$start). "/" . "Gesamtzeit: ".(microtime(true)-$globalstart));
+ return Storage::disk('cache')->response($cacheName."_pixel");
+ }
return abort(500);
}
diff --git a/resources/views/themes/gallery/gallery/list.blade.php b/resources/views/themes/gallery/gallery/list.blade.php
index 9e149e0..70f7f3b 100644
--- a/resources/views/themes/gallery/gallery/list.blade.php
+++ b/resources/views/themes/gallery/gallery/list.blade.php
@@ -10,7 +10,7 @@
@foreach($images as $image)
-
+
@endforeach