FilamentF
Filament2y ago
Luiz

Spatie Media Library records media but does not display it.

I am using the Spatie Media Library package (https://filamentphp.com/plugins/filament-spatie-media-library).
In the form I created the upload:

Forms\Components\SpatieMediaLibraryFileUpload::make('media')
->label('')
->multiple()
->image()
->imageEditor()
->reorderable()
->appendFiles()


After saving the form, the media record is created in the Media table correctly, but the media disappears from my form as if it were empty. I also have the media column in my table (which I previously used with common upload), but nothing is saved in it. I believe it is not necessary.
However, on my blade page I am trying to display the image but the return is empty:

$record->getFirstMediaUrl()


What am I doing wrong?
Was this page helpful?