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

philipbaginski's avatar

Images in public folder.

Hi everyone! I moved app from local to server. During development I had symlink from public/storage to storage/app/public created by php artisan storage:link command. Now I can not see all images.

Any idea how to fix it?

0 likes
12 replies
philipbaginski's avatar

Is it the only way and the best way? Asking as a newbie :-) No idea how to make it :-)

shez1983's avatar

php artisan storage:link or similar.. i believe it does that for you.

you can also manually put folders inside public/images or w/e i dont think there should be a prob with that

bobbybouwmann's avatar

You need to run php artisan storage:link on the server and it should work ;)

burimb's avatar

You can use with command

only change path/to with current dir

ln -s /path/to/laravel/storage/app/public /path/to/public/storage
philipbaginski's avatar

I found this solution:

  1. Run php artisan storage:link command manually.

  2. Add this code to the top of the web.php file:

Artisan::call('storage:link');

, and it works. Is it a proper way to make it or it's just kind of fix?

1 like
kkhicher1's avatar
Level 2

very simple steps....

first create a temp. route to call a artisan command

Route::get('/symlink', function () {
    Artisan::call('storage:link');
});

then open browser and go to url -> http://example.com/symlink ========> only once

then check your public folder linked or not

hope its help..... if not reply this conversation

1 like
kkhicher1's avatar

select a best answer so in feature other can get solution as fast as possible.

bobbybouwmann's avatar

A better solution would be having a server where you have access through SSH so you can run the commands yourself. This is not the most ideal way to run commands to be honest.

1 like

Please or to participate in this conversation.