Laravel storage image on server is not showing - laravel

Hello laravel storage link image is showing perfectly in localhost and when i upload the project to shared hosting images are broken. To show images i have been using this syntax
<img src="/storage/users_image/{{$user->users_image }}"
the above one works great on localhost on shared hosting this images are broken to solve i make storage link but images are broken again on broken images it shows https://www.yuvxyz.com/storage/users_image/xxxy.png
note i have uploaded public and other folders on different folders.

Finally i got the solution from YouTube and it works i have created symlink then it worked here is the PHP file

Related

Error 422 Uploading files with laravel livewire

I am trying to upload images to S3 using laravel livewire file upload, everything works fine in development, but after deployment on staging or production, I still can upload some images but others ( mostly taken with Iphone ) are giving 422 error, I can upload them after cropping them. How can I solve this issue? I am using Heroku.enter image description here
enter image description here
Okay, I solved this by adding FILESYSTEM_DRIVER=s3 into config vars in productions.

How to fetch newly added images from VM in google cloud platform?

When I add images it is stored inside google cloud platform VM correctly.
But I am not able to fetch newly added images in my website.
If I redeploy project with newly added images in assets folder it is showing correctly.
I have verified there is no mistake on frontend or backend side.
Is it not possible to get live image update with VM?
Edit:
I have used Vue.js.
I am storing images inside src/assets folder.
When I save images in my website it is saved at src/assets folder.
I think it can only access things in dist folder after build.
Can you suggest where should I save my file?
I'm making an educateg guess it's some cache issue.
Instead of putting your image files inside the VM you can try storing them in a bucket that's accessible to public. The downside is that it can serve only static files (no PHP or anything).
You have to configure your load balancer to forward all your.domain.com/images/ requests to the bucket but that's actually quite easy. Have a look at my answer asking for such configuration.

image is save in server but cannot be accessed laravel

I am using laravel file-manager to store image and it was working fine in http but after changing to https the image are not being displayed although they are being stored in public folder. Only image that are added recently have that problem old image are fine.
The error was in storage:link so after unlinking and then linking that it worked.

Laravel 5.6 file not found in storage

My Laravel application is about uploading and showing images. It was working good and all images where shown correctly. Now a few weeks later I tried to test it again and it stopped working. Images are in Laravel storage and path is correct but it says: "Failed to load resource: the server responded with a status of 404 (Not Found)".
Path is: http://localhost:8000/storage/images/8/uploaded/1536930406sunflower.png, and it's correct, image is there.
Weird is that it was working for months and now images cannot be found.
Thanks!
I have found the solution to my question and for those who have the same problem:
Storage link in public folder can be possibly broken.
1)Delete storage link in app/public folder.
2)Run command php artisan storage:link to create storage link again.
Also, you have to be sure about your upload folder name and database image addresses are the same.
Otherwise, it will broke and do not forget that it is case sensitive.Example: If image address is "jpg/photo1.jpg" on DB. Your upload folder in storage folder must be "jpg" not "JPG".

Images do not display on a static page hosted on AWS S3

In S3, I have an index.html, a CSS file and an images folder with 3 jpg files in it. I cut and pasted the jpgs into the S3 folder. They showed as being there. I set a display policy per the instructions to display to everyone. The page displayed, but the images did not. I get the alt text and the tooltips, but no images. On the page, when I right click the Open Image in New Tab, I get an Access Denied message in XML. The page is: http://s3.amazonaws.com/pittsfordcommunitycenter/index.html
Images display on my development PC. I've tried a lot of things in AWS, including what the documentation suggested. What do I need to change?
This is your index.html URL:
http://s3.amazonaws.com/pittsfordcommunitycenter/index.html
This is your first image URL, which is missing the bucket name:
http://s3.amazonaws.com/images/WheelchairInElevator_w_475.jpg
The image URL should actually be:
http://s3.amazonaws.com/pittsfordcommunitycenter/images/WheelchairInElevator_w_475.jpg
Viewing your page source it looks like, given the location of your index.html file, all your image paths should start with ./images/ instead of ../images/. Since it works on your local machine I'm guessing your local index.html location is different, relative to the image files.
AWS domain links are case sensitive unlike you local machine.
In AWS S3 static Webhosting
../images/WHEELCHAIRINELEVATOR_W_475.JPG is **NOT EQUAL** to
../images/wheelchairinelevator_w_475.jpg

Resources