Image in views not working. I can see the image in the back-end when I browse the BREAD. However when I'm trying to display the image in my views it's not working even though the image link seems to be pointing to the correct directory. Following is the image URI -
http://localhost:8000/public/storage/about/November2017/about-1.jpg
I tried creating symlink but it still didn't work.
This is how my filesystems.php looks like -
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
Things already tried: created symlink, changed url in filesystems.php, visibility set to public
Working for a University project assignment. This is sort of urgent.
1) Upload image
2) Try to display image in view (front end pages)
Are you using Voyager::image($item->image) ?
Your path looks wrong because theres still the public directory (if you remove it, it should be fine)
Fantastic. It works after removing the public directory. How stupid of me. Thanks a lot!! :)
$p->images is an array?
And try {{ Voyager::image($p->image) }}
Your first solution worked. Thanks a lot buddy. :)
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
Are you using
Voyager::image($item->image)?Your path looks wrong because theres still the public directory (if you remove it, it should be fine)