title: change absolute path to relative using gulp
body: <p>In my gulp workflow I have a task that uses npm browser-sync module to serve static files. One of the options of this module is able to set a base directory to let me call js/css/img files etc, and include it using an absolute path like this:</p>
  
  <pre><code>&lt;img src="/imgs/label.png"&gt;
  </code></pre>
  
  <p>this feature let me call this file from any subdirectory I want</p>
  
  <pre><code>/public
  ---/imgs
  ------label.png
  ---/catalog
  ------list.html   &lt;--- here
  ---index.html   &lt;--- and here, this image called using the same path /imgs/label.png
  </code></pre>
  
  <p>this works fine. Otherwise, I have a task that builds the final compressed and minified version of static files. The problem is, that when gulp building a dist folder with that files that located in the public folder, in html files, there's still absolute path in attributes like href/src. <strong>I need to convert the absolute path into relative with keeping a folder structure</strong>. I mean that in <strong>index.html</strong> src has to be <strong>imgs/label.png</strong>, and in <strong>catalog/list.html</strong> the same src attribute has to be <strong>../imgs/label.png</strong>. Question: is there any module that able to do this for me, or maybe there's some another way to do that, instead of replacing the paths with own hands? Any advice would be appreciated.</p>