FilamentF
Filament11mo ago
morty

Spatie Media Library Plugin black screen on upload of some files

I have no idea what's happening. There is no log, no exceptions, no errors.

When uploading only some images, the upload succeeds but then gives a black modal screen.

Example image: https://imgur.com/a/kjG7ksS

Below is a GIF of the issue.

This is my code:
SpatieMediaLibraryFileUpload::make('photos')
    ->collection('photos')
    ->disk(Filament::getId())
    ->visibility('private')
    ->multiple()
    ->reorderable()
    ->panelLayout('grid')
    ->openable()
    ->maxSize(1024 * 10) // 10MB
    ->image(),
CleanShot_2025-02-11_at_11.19.05.gif
Solution
Thanks for testing. I noticed it was doing an error 500 in the console so I searched around and found this thread: https://github.com/spatie/laravel-medialibrary/issues/322

I upped my memory limit from 128 to 256 and it seems to have resolved the issue. Unsure why so much memory is necessary though.
GitHub
Hi, I'm trying to use a media conversion to resize the uploaded images. When I upload small files (around 300kB), everything works. The images are stored correctly and a conversion shows up in ...
Was this page helpful?