No such file or directory with artisan storage:link

There is a symbolic link in the public folder called “storage” that points to the physical location of the public disk of your Laravel installation. When the Laravel project has moved to another folder, which I imagine will be your case, that symbolic link is lost and stops working. It is still in the public folder, but it leads to a physical folder on disk that no longer exists.

The solution is to simply delete the symlink:

cd public rm storage

And then run the artisan command again to create it:

php artisan storage:link

With this your problem should be solved.

Now, if your images still don’t show up even though the symbolic link exists and is well directed, note that the domain of your local application has not changed. If you use Valet for example, when you change the path of the project, it may also change the virtualhost where you have it hosted to local, in which case you would also have to change your .env file to place the new application domain in APP_URL.

See also  /home/nestjs
Loading Facebook Comments ...
Loading Disqus Comments ...