How do i connect my image in laravel+js framework

Heyy guys, i am currently learning Laravel but using JS as the frontend

its basic but i struggling with it 🙁

The code

            <div className='hexagonal'>
                <img src="../../public/img/Hexagonal1.webp" alt="Hexagon" />
            <div className='firstpage'>

but when i check the frontend, the image is crashing and when i check the console its always 404 not Found.

my image is inside the public/img folder , and my code is inside resources/js/Pages/Homepage.jsx , the image is below so you guys can check the folder tree structure

Folder Tree

i appreciate any help, thank you so much !

>Solution :

Perhaps change ../../public/img to ../../../img or if public is in the root /public/img

Leave a Reply