I am using react and laravel and the image save in backend folder how I can display it in the frontend ?
I use this path
<img src="http://localhost:8000/public/avatar/images.png"/>
but do not work
CodePudding user response:
the /public folder is usually the web root - so you may want to try -
<img src="http://localhost:8000/avatar/images.png"/>
Assuming you have moved the uploaded file to your applications "public" path.
The root folder for laravel is usally the folder above the public web root.
Better also not include the host
<img src="/avatar/images.png"/>