0
votes

I have uploaded a laravel project in cPanel.

public folder of my project is uploaded inside public_html of cPanel. Other folders are uploaded in the root folder of cPanel.

Now Those images which are shown are uploaded while I run the project locally and those images are now inside the public_html/storage/ in cPanel.

When I am uploading another images in my project from cPanel those are uploaded inside the root folder myProjectName/storage/app/public

Here is the picture

enter image description here

Here is the red mark image is not shown and this image I have added after uploading the project in cPanel.

Any body help please?

2
Why do you understand this? Most of us won't because there is so little information you supply. Take a look at the source-code and the web inspector, what do they say?Tom
What is the current path vs. what's the path meant to be?Andy Holmes
@Andy Holmes.......url.com/storage/myFile.jpg....path means image src...raff
@Tom Lankhorst...What you won't understand ? Please ask if any queryraff
@raff I'm aware of what a path is, I'm asking you what is the current path of the image that isn't loading, and what is the path that it should be?Andy Holmes

2 Answers

1
votes

if use laravel storage to uploaded run below in terminal

php artisan storage:link

take care what is directory permission !!!and in sever file uploaded or not. if uploaded where is uploaded?

0
votes

To clearify some stuff, the other answer by @Mahdi Bahari would be correct. When files are stored outside your laravel project you must do a

php artisan storage:link

If however you are unable to get shell access with your host, then you should probably not upload images outside the laravel project. My first recommendation would be using laravel's storage folder. Which is what laravel uses to store folders / images for the project. Laravel file storage