'how to display images from rest api to fronted but it display only in image using multer

it displays only the image logo fronted, not the whole image which I uploaded in my backend in string format please resolve my error what is my problem in my code...

section.js (fronted)

post route in backend and (upper part)

post route in backend and (below part)

Backend main file server.js

when I see it in the browser then it renders me as below

 on browser

please help me to run out of it...



Solution 1:[1]

Your Posts include not url of your image. They include filename. You need to write your full path to the image. Your server is listen in http://localhost:5000 So you need to write:

<img src={`http://localhost:5000/${post.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 vitaliyirtlach