title: (Rails) IMGKIT - Issues in exporting images with html and css
body: <p>I'm using IMGKIT in one of my projects and had to use their css with html option to satisfy a requirment. I noticed that if stylesheets are set as follows:</p>
  
  <pre><code>kit = IMGKit.new(html, :quality =&gt; 50)
  kit.stylesheets &lt;&lt; '/path/to/css/file'
  </code></pre>
  
  <p>and the stylesheet has a background property with a relative url('image.png'), image is not generated when exporting it using kit.to_file:</p>
  
  <pre><code>(Rails.root + "public/pngs/" + "image.png")
  </code></pre>
  
  <p>The request hangs, and if we replace the background url to full url with protocol, host and port, it is well exported.</p>
  
  <p>Do I need to have absolute urls to all my images in my stylesheet?</p>
  
  <p>I have tried defining asset_host in my development.rb file: </p>
  
  <pre><code>config.action_controller.asset_host = Proc.new { |source|
       "#{request.protocol}#{request.host_with_port}"
      }
  </code></pre>
  
  <p>It does replace the url in the css if I check on browser but still the images are not generated when exported through IMGKIT.</p>