Images Not Displaying on Live Server (Shared Hosting) #53942
Unanswered
FaizanKamal7
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Images stored in the
public/storage
directory are not displaying on the live server (shared hosting environment), but they work perfectly on localhost.Relevant Code
Trainee.php
MethodBlade Template
filesystems.php
ConfigurationCommands Executed on Shared Hosting (via SSH)
Below are the commands I ran to set up the symbolic link for the storage directory:
Verifications
After running the commands:
ls -l public lrwxrwxrwx 1 user user 61 Dec 17 10:22 storage -> /home/customer/www/.../storage/app/public
...
contains the app path that I'm passing in .env asAPP_URL
storage/app/public/trainee-profile-pictures
directory:ls -l storage/app/public/trainee-profile-pictures/ -rwxrwxr-x 1 user user 26990 Dec 17 07:36 gAgoBddnYT7SH0eiV2u000bqZT5j2TGQjcoedHlj.jpg```
Expected Output
The
getProfilePicture()
method in theTrainee.php
model should return the correct URL of the image, and the<img>
tag in the Blade template should display the image.Debugging Observations
Actual image path:
/storage/app/public/trainee-profile-pictures/gAgoBddnYT7SH0eiV2u000bqZT5j2TGQjcoedHlj.jpg
Values observed during debugging:
Observations:
Request
Please guide me on:
Beta Was this translation helpful? Give feedback.
All reactions