ImageColumn is not showing image
I'm trying to show image on table but its not showing it and I'm getting this console error. Note: Images are getting stored in /var/www/html/storage/app/product-image
25 Replies
You either need to store them in storage/app/public/product-image or create a disk that you can symlink that isn’t in the storage public directory.
->disk('storage') ??
->disk(‘public’)
ok let me try with that
You’ll need to reupload the image though
Look at config/filesystem.php to see how the disks are setup in laravel.
Only things in storage/app/public are accessible in the browser without a temporary signed url.
Yep, that’s the disk you want unless your images need to be private.
It should be the default in filament.
And if needs to be private then ?
Then you have to do more.
That gets into more complicated setup.
But it’s doable.
What I need to do for private
Have a look at the laravel docs on storage to understand the difference first.
ok
And here’s the filament docs about the disk and directory for uploads. https://filamentphp.com/docs/3.x/forms/fields/file-upload#configuring-the-storage-disk-and-directory
If that is all set up correctly the image column should have the same modifiers for the disk and directory etc.
it shows me these two paths
are they same as showing same pictures
getting this console error now
/var/www/html/storage/app/public/product-image
When you run php artisan storage:link it will create a symlink from storage/app/public to /public/storage
yeah it created that
Anything in the app outside of the /public path will not be resolvable directly by the browser.
That’s the reason for the link
Something is off at your server level.
hmmm
idk I have to see
Yea. To be honest I’m making my best guesses at this point without being able to see the whole setup, but serving laravel in a sub path/directory will create issues if the server is not configured correctly.
Hello, sir. it seems I have the same problem. why when displaying the imagecolumn does the localhost URL appear instead of the domain URL set in the env?
Is there a
hot
file in the public folder?It was some permission issue on server its solved now .. thanks for the help though 🙏🏻