title: How to load an image from OUTSIDE of the document root, using Twig?
body: <p>I've been exploring the issue of allowing web site visitors to securely upload images. I've come across this article:
  <a href="https://stackoverflow.com/questions/38509334/full-secure-image-upload-script">Long article about securly uploading images</a></p>
  
  <p>It seems that the most important thing is to store the files outside of the document root.</p>
  
  <p>Now, if i understand correctly, the "<code>document root</code>", in the case of using XAMPP, for instance, is what <code>$_SERVER["DOCUMENT_ROOT"]</code> gives, which is <code>C:/xampp/htdocs</code>
  in my case. So putting my upload directory "outside" of it would mean creating a directory in <code>C:/xampp</code>. Am i right?</p>
  
  <p>Anyway, I've tried doing so, and couldn't load the images in the template. The image source would always be interpreted as having "<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>..." in the beginning, and therefore the file can't be found.</p>
  
  <p>I saw on that article that a function called <code>readfile()</code> needs to be used, but i have no clue how to implement it on Twig.</p>
  
  <p>I would appreciate any help resolving this issue.</p>