Randy_Johnson's avatar

Image Location Issues on Server!

Help, I having issues with the images, they are working on the local but when I pushed it to the server and check the image upload, there was a 404.

I have looked in the server and these are the links, there must be something I am missing.

/home/username/domains/url/laravel/public/storage/images/answer
/home/username/domains/url/laravel/public/storage/images/answer/da01ns03dU8kr8VV3izQ01OMGwLiCfyueA4qZr4O.png
https://url.com/storage/images/answer/da01ns03dU8kr8VV3izQ01OMGwLiCfyueA4qZr4O.png

The above is showing problems, I just copied the link straight from the database, check the file, and the image is in there.

Replicating the same actions on local shows a successful result.

Update

It shows all images inside https://url.com/storage/images/ but having https://url.com/storage/images/answer is causing the problem. Strange.

Update

I fixed it but still is a pain in the ass because now all my images will not be separated.

0 likes
3 replies
Snapey's avatar

it's your code. Put the images where you need, with whatever url structure you want

1 like
Randy_Johnson's avatar

@Snapey Yeah it was real crazy, it was working on local, and not on the server. Checking to see if the url for images in ~/storage/public/images worked fine, so I changed the upload directory to this and it worked.

I just uploaded another website, and there is no trouble with the directories. Just one of those things I guess.

Please or to participate in this conversation.