disk)->delete($file->path); // Every rendition, for every audience — a deleted file's bytes // must not survive on disk because whoever wrote the cleanup // only knew about the one copy they had in mind. foreach (ThumbnailGenerator::pathsFor($file->id, $file->mime_type) as $renditionPath) { Storage::disk('files')->delete($renditionPath); } } catch (Throwable $exception) { Log::warning('Could not remove disk bytes for deleted file '.$file->id.': '.$exception->getMessage()); } } }