ahmedde's avatar

[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

0 likes
0 replies

Please or to participate in this conversation.