Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Yamoon1983's avatar

Upload images on live server/shared hosting , not working

On localhost i can upload images and links working perfectly, but after deployment on live server and when I upload image the images not found in the folder and showing broken image. please I need help

I already put the image folder permission to 777 and already run command : php artisan storage:link on the live server. and still not working.

0 likes
7 replies
Snapey's avatar

What folder do your images appear in?

What is the URL to an image (on production)?

Have you a funky installation where the project is being served and not the public folder?

Snapey's avatar

@Yamoon1983 How did you end up with a public_html folder?

I can sense bad hosting configuration

1 like
martinbean's avatar

@Yamoon1983 Why on earth are you uploading user files to your public directory? If a user manages to upload a malicious file and it’s publicly accessible, then they now have the ability to execute that file and give them a backdoor into your web app, and potentially your entire server.

Upload files to a non-publicly accessible directory (this is what the default local disk is for, which will save files in the storage directory outside your web root) and then only ever serve generated thumbnails on your website. Never return a user-uploaded file as is.

1 like

Please or to participate in this conversation.