After uploading my site to server when i upload photos it show the broken image. and the image is also broken in the folder. How do i fix this problem. Other images which are added before uploading to server is displaying perfectly. Can you helpme out??
I can guarantee your version numbers are wrong. Voyager v1.0.* does not support Laravel v5.6.*.
Also, please provide the 3rd part of the version number. There are often significant changes between patch versions. While we make every effort to avoid breaking changes in patch releases, they do sneak in sometimes.
What seems to be the URL for the image? And what is the URL for the Voyager admin panel?
@fletch3555 Oh sorry. i am using "laravel/framework": "5.5.39","tcg/voyager": "^1.0"
@marktopper I have a project which is upload in the root directory in cPanel and the public folder is in public_html. What i want to do is when i upload the photo they should be in the public_html/images folder. And i also want to fix the default user logo, loading image. How can i do it? Now, i am also getting "readlink(): Invalid argument" error ?
hey @marktopper @fletch3555 please help me out. I am badly stuck in my project.
What URL does it try to load the uploaded image from, the exact URL please (you may remove your domain name)
@marktopper /storage/products/March2018/ycSRQNxJe41gDXf75rIb.png is the URL. This directory is inside the public which is in 'public_html' and the other are in the root directory.
The other wont be accessible when they are not inside your public directory.
What is the type of your public/storage is it a folder? A symlink?
@emptynick When i was running the project in localhost is was symlink. But after uploading to cpanel the symlink is broken and i got this problem.
Then rename public/storage to e.g. public/storage2 and either visit the Voyager dashboard and click Fix it or from console run php artisan storage:link
You might wanna join our Slack, there we can help you much faster and accurate!
@emptynick i got this error after clicking in fix it alert. "symlink() has been disabled for security reasons".
Ask your hosting provider to enable symlink.
@marktopper Is there other way to fix this problem??
You can also change the storage driver to upload directly to the public path instead of the storage/app/public folder.
@marktopper i have tried to store it in my public_html which contains all the public contents of the project. But my other codes are out of the public_html. How can i link it to store the images to the public folder?
You will have to configure the storage driver used for Voyager. By default Voyager uses Laravel's public storage disk.
@marktopper how can i change the root storage_path to the folder images inside the public_html??

'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/images',
'visibility' => 'public',
],
Thank you all of you for your help. Finally, my problem is solved.
I have same problem and can not solve it .
If any one help me?
Thank you all of you for your help. Finally, my problem is solved.
how do you fix the issue? i stuck so badly here please help me
Most helpful comment
Then rename
public/storageto e.g.public/storage2and either visit the Voyager dashboard and clickFix itor from console runphp artisan storage:linkYou might wanna join our Slack, there we can help you much faster and accurate!