mostafaamine briere
mostafaamine briere

Reputation: 23

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::make('thumbnail')->collection('posts')

And this is the code for table columns

SpatieMediaLibraryImageColumn::make('thumbnail')->collection('posts')

Thanks.

Upvotes: 2

Views: 10684

Answers (4)

Abish R
Abish R

Reputation: 51

I got issue even after updating right url for APP_URL on .env file. Fixed after clearing configuration cache.

php artisan config:cache

Upvotes: 0

Serenity Duck
Serenity Duck

Reputation: 146

Check in your .env (root folder of your laravel project) file that the APP_URL is the same as your server url. You get the server url on startup (php artisan server) mine is http://127.0.0.1:8000. (or http://localhost:8000)

So you fill in from APP_URL=http://127.0.0.1 and change to APP_URL=http://127.0.0.1:8000 If you have localhost fill in APP_URL=http://localhost:8000

Check if the files are uploaded to your storgae and been linked with your public folder. In your CLI: php artisan storage:link

Upvotes: 13

John Deck
John Deck

Reputation: 899

You should use:

php artisan storage:link

Upvotes: 7

Christian S
Christian S

Reputation: 11

Check your APP_URL and take care of the correct port.

Upvotes: 1

Related Questions