Not an expert on back end but I think this depends on the server.
If you're not using a server you can use ../ to go up a level. E.g. <img src="../originFolder/subpath/image.png">.
If you're using a server that serves the root directory, then you can write the path like /path/to/image. For example if the root directory is "root" and the image is in "root/folder/image.png", the path would be /folder/image.png. Emphasis on the initial /.
If you are able to customise your server routes then you can rewrite requests to serve whatever you want. For example the image could be in "root/folder1/folder2/image.png", but you could make the server return that file when the request is /whatever. So on the front end you would write: <img src="/whatever">
Ok! Thanks it helps!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.