Support the ongoing development of Laravel.io →
posted 3 weeks ago
0

Couple of things : I can't quite determine if your working direct on your project live, or have an exact copy on your PC for development. I always have a synced copy of a project running in apache on my laptop. I can play around , figure things out from there without messing up my live web

You say you've got uploaded images, by not how they were uploaded or where they went to. I have a Larvel 11 blog engine CMS, images get uploaded from a form. Done by code no need to access hosting

I set out that when the form is submitted , images for a blog would go to for a 'blogImages directory' which is in Laravel public directory. Then how are your images displayed ?

You can look at your web browser source code to see if output makes sense. Here is what im using for an image :<div class ="blogArticleImg"> <img src ="http://127.0.0.2/blogImages/1738951921-goli.jpg" class="img-fluid" align ="left" ></div>

The above is whats seen in web browser source code but code in view that outputs that is :

<div class ="blogArticleImg"> <img src ="{!!url('blogImages/'.$blogs->image) !!}" class="img-fluid" align ="left" ></div>

So above i know the path to any blog image is going to be blogImages directory. I save image data in an sqlite3 database

The code inside controller that passes to view is :

` public function blogArticle( $slug )

{

$this->slug=$slug;
	
	
  $this->blogDbRecord = DB::table('blogs')->where('slug',$this->slug)->first();

return view('blogArticle',['title'=> 'blogs', 'blogs'=>$this->blogDbRecord]);

}`

`

Should be no need to use symbolic link; try sticking an image in public rather than storage.

Ive set it up for one of Laravel webs which runs locally on my laptop in apache , that it gets served at URL 127.0.0.02.

So path for 1738951921-goli.jpg will be first the "localhost URL i set up " which is 127.0.0.02 then all blog images go to directory "blogImages" (no need to put public in path to image )then name of image itself which for above is 1738951921-goli.jpg

Last updated by @captain-sensible 2 weeks ago.
0

I just wanted to add my perspective here.

I’ve faced a similar issue on shared hosting where php artisan storage:link didn’t work. In my experience, the most reliable solution is to save images directly in a folder inside public/, like public/blogImages. This way, you don’t have to rely on symbolic links, which can fail depending on the hosting setup.

You can still keep storing the image names in the database and access them with url('blogImages/'.$imageName) in your Blade views.

hopefully this helps!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

luchi jan-natt Joined 21 Jan 2026

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.