'LARAGON img path

I added an image file on my project folder in laragon root with the following path:

C:\laragon\www\myproject\public\img\image.jpg and another on C:\laragon\www\myproject\resources\img\image.jpg

when previewing the project using Docker Desktop, the url is http://localhost/myproject but can't seem to display my image on the page.

What should be the correct path to access my images?



Solution 1:[1]

You can use asset function:

<img src="{{ asset('img/image.jpg') }}" alt="My Image">

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Molod