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

romit_k's avatar

Images/Files are not accessible from Public Folder

Hi All,

I want to access images, files and videos from Public folder. I have given all the permissions to the folders still not accessible, kindly assist me here. I am adding code how I am accessing the images from the folder and the error also -

<img src="{{ URL::to('uploads/banners/17468945801522.jpg') }}"
                                                         alt="{{ $BTitle }}"/>

issue accessing image-

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.59 (Win64) PHP/8.2.18 mod_fcgid/2.3.10-dev Server at localhost Port 80

Please help me

0 likes
6 replies
GendeDev's avatar

Hi romit_k, In Laravel, a symbolic link, or "symlink", is a way to link one directory, such as storage/app/public, with another directory, usually public, so that the files in storage/app/public are publicly accessible. It works like a shortcut, allowing access to the files in storage/app/public through the public/storage URL. The symbolic link is created using the command php artisan storage:link in the command line.

romit_k's avatar

@GendeDev I tried this also but not working maybe something happened with the htaccess file. Can you share the basic code for it?

jlrdw's avatar

Where is uploads/banners located?

You have a public\uploads\banners folder?

romit_k's avatar

@jlrdw Yes, I have the public\uploads\banners folder in the root directory. Inside the banners folder images are placed.

jlrdw's avatar

@romit_k you should be able to display with the asset helper.

Example of one of my older apps:

<img src="{{ asset('upload/imgdogs') . '/' . $row->dogpic }}" alt="" class="image">

But not knowing your folder structure it's hard to say. I place main laravel out of web folders.

Snapey's avatar

what is the url of your test site? Do you have to add /public/ to all your url?

Please or to participate in this conversation.