I have express server and special folder for images.
app.use(express.static("files"));
And if I try to get an image, for example, in localhost:3000/test from the files folder, it works. But if I try to get an image for example in localhost:3000/profile/404 from the same folder - it doesn't work
Change the path of public to:
app.use(express.static(__dirname +"/files"));
And make sure you access the files with absolute paths from client:
<img src="/profile/404.png" />
On server: files --> profile --> 404.png