How to access images inside public folder in laravel?

0 votes

Hii,

How can I access the images stored inside public/images folder without the use of Laravel's own functions like assets()?

I just want to get the direct URL of the images stored in images folder.

Eg:

localhost/webapp/images/fool.png

When requesting the link i should get the direct image.

Thanxx in advanced!!

Apr 3 in Laravel by kartik
• 11,290 points
812 views

1 answer to this question.

0 votes

Hii,

Just put your Images in Public Directory (public/...folder or direct images).
Public directory is by default rendered by laravel application.
Let's suppose I stored images in public/images/myimage.jpg.
Then in your HTML view, page like: (image.blade.php)

<img src="{{url('/images/myimage.jpg')}}" alt="Image"/>

Thank YOu!!

answered Apr 3 by Niroj
• 22,790 points

Related Questions In Laravel

0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19 in Laravel by Niroj
• 22,790 points
40 views
0 votes
1 answer

How to mock a static facade methods in Laravel?

Hey, Facades provide a "static" interface to classes ...READ MORE

answered Mar 19 in Laravel by Niroj
• 22,790 points
111 views
0 votes
1 answer

How to delete or clear caching in Laravel?

Hey @kartik, There are many commands to clear ...READ MORE

answered Mar 20 in Laravel by Niroj
• 22,790 points
64 views
0 votes
1 answer

How to get user's IP address in Laravel?

Hey, We can get the user's IP address ...READ MORE

answered Mar 20 in Laravel by Niroj
• 22,790 points
368 views
0 votes
1 answer

Why it is necessary to refresh CSRF token per form request?

Hello, Generating a new CSRF token for each ...READ MORE

answered Mar 19 in Laravel by Niroj
• 22,790 points
186 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27 in PHP by Niroj
• 22,790 points
36 views
0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

answered Mar 27 in PHP by Niroj
• 22,790 points
41 views
0 votes
1 answer

How to retrieve or obtain data from the MySQL database using PHP?

Hello kartik,  Actually there are many functions that  ...READ MORE

answered Mar 27 in PHP by Niroj
• 22,790 points
33 views
0 votes
1 answer

How to pass data through URL and access through controller in Laravel?

Hello, You can  first refer how to  Create controller through ...READ MORE

answered Mar 18 in Laravel by Niroj
• 22,790 points
224 views
0 votes
1 answer

How to pass URL param in Laravel?

Hello, First you have to go to routes ...READ MORE

answered Mar 18 in Laravel by Niroj
• 22,790 points
108 views