rebuilding thumbnails command

This commit is contained in:
2024-09-27 15:32:35 +03:00
parent 63232585ab
commit 6458c1e71d
2 changed files with 15 additions and 41 deletions
+1 -3
View File
@@ -79,7 +79,6 @@ class FileService
throw new LucentException("File $filename not uploaded");
}
// $this->createThumbnail($disk, $schema->path, $filename, $file);
$this->createTemplates($disk, $path, $file);
list($width, $height) = $this->isImage($mimetype) ? getimagesize($file) : [0, 0];
@@ -130,9 +129,8 @@ class FileService
return $record->id ?? "";
}
private function createTemplates(Filesystem $disk, string $path, UploadedFile $file): void
public function createTemplates(Filesystem $disk, string $path): void
{
$originalImage = $this->imageManager->make($disk->get($path));
foreach (config("lucent.imageFilters") as $preset => $filterClass) {
$image = $originalImage->filter(new $filterClass);