title: Symfony 2.7 access image outside web directory
body: <p>I read a lot of article about the problem but it seems that there has to be no answer yet to this.</p>
  
  <pre><code>So my project directory is like :
  + uploads_dir
  + symfony_proj
      - app
      - bin
      - src
      - vendor
      - web
  </code></pre>
  
  <p>I want to get the image inside the uploads_dir for me to use in my view page
  </p>
  
  <p>I created twig extension that fetches the roor directory.. but it seems not to read if I put "root_dir"."../../uploads_dir".</p>
  
  <p>Any suggestions ?</p>
  
  <p>Here is the my twig extension part of it:</p>
  
  <pre><code>/**
       * @var container
       */
      protected $container;
  
      public function __construct(ContainerInterface $container){
          $this-&gt;container = $container;
      }
  
  public function bannerFilter($filename)
      {
          $file = $this-&gt;container-&gt;getParameter('kernel.root_dir').'../../uploads_dir'.$filename;
  
      }
  </code></pre>