Fixed: get path url from storage rather from http

This commit is contained in:
Werbeagentur AWEOS 2019-10-18 09:40:27 +02:00
parent 6c5d21ec44
commit b4c8125d72
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<?php namespace Aweos\Resizer; <?php namespace Aweos\Resizer;
use Storage;
use Backend; use Backend;
use System\Classes\PluginBase; use System\Classes\PluginBase;
use System\Classes\MediaLibrary; use System\Classes\MediaLibrary;
@ -153,7 +154,7 @@ class Plugin extends PluginBase
return false; return false;
}) })
->map(function($fileVersion) use ($l) { ->map(function($fileVersion) use ($l) {
$sizes = getimagesize($l->getPathUrl($fileVersion->path)); $sizes = getimagesize(Storage::path('media/'.$fileVersion->path));
return [$l->getPathUrl($fileVersion->path), $sizes[0], $sizes[1]]; return [$l->getPathUrl($fileVersion->path), $sizes[0], $sizes[1]];
})->sortBy(function($size) { })->sortBy(function($size) {