0

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

1
  • 2
    without public in the path Commented Oct 4, 2021 at 14:39

1 Answer 1

2

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"/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.