Convert absolute file path to relative
<p>I am trying to serve files from my images folder inside the wwwroot folder of my ASP.NET Core application where I have already enabled static files access in the <code>Startup</code> class.</p>

<p>The <code>HostingEnvironment</code> service provides me with a <code>WebRootPath</code> property that provides me with an absolute path to the wwwroot folder but using this path gives me a "Not Allowed to load local resource" error in my browser's console.</p>

<p>If I access the file from my browser using <code>localhost</code> + the relative path I am able to get the image file so there is no issue about authorization.</p>

<p>All I need now is to be able to convert that absolute path into a relative one to my web server.</p>