I have a problem displaying images when hosting the site. Locally, I was using the dynamic link to display images, but it only works locally. My images are stored in the : : storage/app/public/Images tree.
<div class="card-bg" style="background-image: url('{{ asset('storage/ServiceImages/' .$service->service_image) }}');" ></div>
and this
<img src="/storage/ActualityImages/{{$actualite->actuality_image}}" class="img-fluid" alt="" style="height: 200px; object-fit: cover;">
Using both approaches the images are displayed locally but not online. and I’m asked to use the absolute path, I’ve done so but without success.
2
Answers
the way i record my images
You can delete the Storage folder
And run this again on your server
However if you don’t have SSH access to the Terminal
You can store the public files in the **public folder without any symlinks
Here’s how u can do it
Change this code
With this
An then u access you image
https://yourwebsite.com/ActualityImages/$imagename