Image preview not loading using FileUpload
The image gets saved when I create a new brand, but when I navigate to 'Lists,' the image is not displayed.
This is my APP_URL: APP_URL=http://127.0.0.1:8000. I have already run the command php artisan storage:link.
Relevant code in my BrandResource :

Solution:Jump to solution
App url in the env should be the same as the url in the browser. So
http://cc.test
8 Replies
add
APP_URL=http://127.0.0.1:8000//admin
maybe it helps?
its better to have a virtual host per app instead of sub folderThanks for the response ! By "virtual host," do you mean a URL like the one shown in the URL bar (http://cc.test/admin/brands)? I used Laragon to set up the virtual host. While using the virtual host, I tried with APP_URL=http://127.0.0.1:8000, then I reloaded the browser with your suggestion: APP_URL=http://127.0.0.1:8000/admin. But with both configurations, I'm still unable to see the images like shown in the first image i attached.I also attached an image showing where the images are being saved.


Solution
App url in the env should be the same as the url in the browser. So
http://cc.test
You’ll probably also need to redo the images after making that change. Looks like it might be storing the path wrong too.
OMG, it worked! I really appreciate the help. Also, is it possible to achieve a listing like in the image, displaying only the image and the name of the brand?

Thank you again!
No worries.