You're very close! The issue is likely due to Laravel's file serving setup. When you store files in storage/app/public, you need to make those files accessible from the public web directory. This is accomplished with Laravel's storage symlink. Here’s how to fix your problem:
1. Ensure the Symlink Exists
Run the following Artisan command to create a symbolic link from public/storage to storage/app/public:
php artisan storage:link
This makes files in storage/app/public/uploads accessible in the browser at /storage/uploads.
2. Correct FileUpload and ImageColumn Fields
Your configurations for FileUpload and ImageColumn are correct. disk('public') works with the storage/app/public directory.
FileUpload::make('file_path')
->disk('public')
->directory('uploads')
->visibility('public'),
ImageColumn::make('file_path')
->label('Preview')
->disk('public')
->visibility('public'),
3. Check filesystems.php Configuration
Make sure your config/filesystems.php has a public disk set up like this:
'disks' => [
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
],
// ...
],
4. Confirm The File Exists
Double-check that the file physically exists at storage/app/public/uploads/01K88KDG3E5NVZ0V10B5BTAWCT.jpg.
5. Media Is Publicly Accessible
After creating the symlink (php artisan storage:link), your images will be accessible at:
http://localhost:8000/storage/uploads/01K88KDG3E5NVZ0V10B5BTAWCT.jpg
If you had not run storage:link, this path would not work.
Summary
The key step is to run:
php artisan storage:link
Now, your Filament table will display image thumbnails as expected. If you still don't see the images, clear your browser cache or manually check that the image is accessible at the above URL.