-2
I have a Rest API and it returns all the data of a user, including their image. I can find the image in the directory path, but I can’t click on the page.
Html
<img src="../../../../../../wwwroot/arquivos/defaultM.png">
I let this defaultM.png to make it easier to visualize, there is actually always a variable, but even so, it doesn’t work for both.
Error
Failed to load resource: the server responded with a status of 404 (Not Found) defaultM.png:1
What should I do in this case?
The image exists in the directory! And the way is right, I can even view the image by itself src
using ctrl + click
The API returns the relative path of the image? already tried to see in the network tab of your browser which the Status the image returns?
– Thiago Costa
This relative path does not seem correct, but without an overview of what is being done, it is impossible to find out. The same with the image by the API. Without knowing its folder/file structure and what the API is returning, it is impossible.
– tvdias
@Thiagocosta the API returns this: Failed to load Resource: the server responded with a status of 404 (Not Found) defaultM.png:1 | But this image exists on my server, it’s there.
– FelipeDwD