F
Filament12mo ago
tesse05

Spatie preview image?

Why after upload an image and refreshing component looks like this? It's required to have the conversion preview? I have tried both and it makes no difference.
No description
9 Replies
Tieme
Tieme12mo ago
What are you trying to do? Where is your code, without code we cant see what you have done and what is missing or wrong.
dissto
dissto12mo ago
Probably like it always is, missing or wrong APP_URL, please verfify your .env and also check if you have a symlink (php artisan storage:link) https://stackoverflow.com/questions/73680721/images-not-showing-using-spatie-media-library-in-filamentphp this stackoverflow (🤣) thread summarizes it properly
Stack Overflow
images not showing using spatie media library in filamentphp
I am having trouble displaying the images uploaded using spatie media library with the filament admin panel. image for clarificatio This is the code for form schema : SpatieMediaLibraryFileUpload::...
tesse05
tesse05OP12mo ago
@Tieme @dissto I have this form... its just a livewire component with form builder.
No description
tesse05
tesse05OP12mo ago
the .env looks like this
No description
No description
tesse05
tesse05OP12mo ago
there's nothing in console any thoughts?
tesse05
tesse05OP12mo ago
the image is accessible...
No description
dissto
dissto12mo ago
Share some code please 😊
tesse05
tesse05OP12mo ago
I have just this filament field lol... I think the workaround is fine, so the image is uploaded where indicated and inserted properly in the ddbb. also, if I dd() the $model->firstMedia() it retrieves the image.
SpatieMediaLibraryFileUpload::make('image')
->collection('image')
->disk('media')
->label('Imatge')
->columnSpan(2)
->enableDownload()
->acceptedFileTypes([
'image/png', 'image/jpeg',
]),
SpatieMediaLibraryFileUpload::make('image')
->collection('image')
->disk('media')
->label('Imatge')
->columnSpan(2)
->enableDownload()
->acceptedFileTypes([
'image/png', 'image/jpeg',
]),
(yes, I do generate preview media conversion) okay, If I fill the first form it all works, but it doesn't work on a second modal... maybe is a bug??
tesse05
tesse05OP12mo ago

Did you find this page helpful?