diff --git a/src/Observers/MediaObserver.php b/src/Observers/MediaObserver.php index e903be2e..9546812b 100644 --- a/src/Observers/MediaObserver.php +++ b/src/Observers/MediaObserver.php @@ -91,6 +91,10 @@ public function deleted(Media $media): void if (count(Storage::disk($media->disk)->allFiles($media->directory)) == 0) { Storage::disk($media->disk)->deleteDirectory($media->directory); } + + // Delete glide-cache for delete image + $server = app(config('curator.glide.server'))->getFactory(); + $server->deleteCache($media->path); } private function hasMediaUpload($media): bool