title: build full url for directory inside webroot in cakephp 3
body: <p>I'm working in CakePHP 3.4.</p>
  
  <p>I have an image outside <code>img</code> directory, in <code>files</code> directory under <code>webroot</code></p>
  
  <p>I have a <code>files</code> directory inside <code>webroot</code> along with <code>css</code>, <code>img</code>, <code>js</code>.</p>
  
  <p>I tried using it like</p>
  
  <pre><code>$this-&gt;Html-&gt;image(WWW_ROOT . 'files' . DS . 'myimage.jpg')
  </code></pre>
  
  <p>which is creating path as</p>
  
  <pre><code>/var/www/html/myproject/webroot/files/myimage.jpg
  </code></pre>
  
  <p>But this is not showing image. Copying and pasting path in another tab is loading image perfectly. Also, moving image file to <code>img</code> directory and using <code>$this-&gt;Html-&gt;image('myimage.jpg')</code> is working fine.</p>
  
  <p><strong>Why it is not working ?</strong> Also, It is easy to build url for directories <code>css</code>, <code>img</code> and <code>js</code> like</p>
  
  <pre><code>// Outputs http://example.com/img/icon.png
  $this-&gt;Url-&gt;image('icon.png', true);
  OR
  // Outputs /img/icon.png
  $this-&gt;Url-&gt;image('icon.png');
  </code></pre>
  
  <p>which will result as</p>
  
  <pre><code>http://example.com/img/icon.png
  </code></pre>
  
  <p>I want to build url for <code>files</code> directory like</p>
  
  <pre><code>http://example.com/files/myfile.jpg
  OR
  // /files/myfile.jpg
  </code></pre>
  
  <p><strong>How to build url for directories other than <code>img</code>, <code>css</code> and <code>js</code>.?</strong></p>