Apr 30, 2025
0
Level 2
[Spatie Media Library] Deleting file with conversions?
I want to preserve only 1 image of a model collection:
if (count($coach->getMedia('profile_picture')) > 1) {
$coach->getFirstMedia('profile_picture')->delete();
}
Problem: This deletes the original file from my disk successfully, but I still see and can access the old conversion in my disk. How do I cascade collection deletes to conversions?
Thanks
Please or to participate in this conversation.