I have everything all set up and I see the url of the image if I inspect the image url http://localhost/storage/1/conversions/Jeery-thumb.jpg but this url is returning 404 on my browser when i navigate to this path. I then tried it with the port my laravel project was running on 8000 and then it showed localhost:8000/storage/1/conversions/Jeery-thumb.jpg How should this be handled ?
only thumb images are showing 404 or all images ???
all images....
Have you tried php artisan storage:link ??
I think this will solve the problem
did that already, I can see the storage folder in the public
@yemilgr
I can reproduce this issue running my Laravel app via php artisan serve.
Having looked into this further I can see that the issue is caused due to the filesystems.php config in my Laravel install using env('APP_URL').'/storage' and my APP_URL in .env is set to http://localhost.
@pianistprogrammer
The solution is to change your APP_URL value to http://localhost:8000
Any solution for this? I have the same problem. I am saving my images in public disk and I have run php artisan storage:link.
Code:
$p = Paciente::find(1);
$mediaItems = $p->getMedia();
$publicUrl = $mediaItems[0]->getUrl();
echo "<img src='" . $publicUrl . "' \>";
@carbontwelve Thank you my friend! This did the trick.
Was horizon running to generate the images behind the scenes?
I'll be closing this issue, if anyone comes up with a concrete error, feel free to drop a reply.
@yemilgr
I can reproduce this issue running my Laravel app viaphp artisan serve.Having looked into this further I can see that the issue is caused due to the
filesystems.phpconfig in my Laravel install usingenv('APP_URL').'/storage'and myAPP_URLin.envis set tohttp://localhost.@pianistprogrammer
The solution is to change yourAPP_URLvalue tohttp://localhost:8000
Thank you. It worked for me
Please run this on cmd
php artisan storage:link
this is solve my problem
Most helpful comment
@yemilgr
I can reproduce this issue running my Laravel app via
php artisan serve.Having looked into this further I can see that the issue is caused due to the
filesystems.phpconfig in my Laravel install usingenv('APP_URL').'/storage'and myAPP_URLin.envis set tohttp://localhost.@pianistprogrammer
The solution is to change your
APP_URLvalue tohttp://localhost:8000