title: Symfony2 CSS images path gets rewritten and I get a 404
body: <p>I'm using Symfony2 and assetic in an existing project and I can't figure out how to refer to images in my CSS. I've put my images in: <code>src/Organisation/MyBundle/Resources/public/images/</code></p>
  
  <p>After running the assets install: <code>php app/console assets:install public</code></p>
  
  <p>I can load them in the browser correctly: <code>http://sitename/bundles/organisationmy/images/logo.png</code></p>
  
  <p>However, when I try to point to them in the CSS, with: <code>url('/bundles/organisationmy/images/logo.png')</code></p>
  
  <p>inspecting with firebug, the url gets changed in: <code>url('/web/bundles/organisationmy/images/logo.png')</code> and that results in a 404.</p>
  
  <p>In my main template I have:</p>
  
  <pre><code>{% stylesheets filter='yui_css' output='css/output.css'
      '@MyBundle/Resources/public/css/bootstrap.min.css'
      '@MyBundle/Resources/public/css/bootstrap-responsive.min.css'
      '@MyBundle/Resources/public/css/my.css'
   %}
  </code></pre>
  
  <p>And in <code>config.yml</code> I have:</p>
  
  <pre><code>assetic:
      debug: %kernel.debug%
      use_controller: false
      java: /usr/bin/java
      filters:
          cssrewrite: ~
          yui_css:
              jar: %kernel.root_dir%/java/yuicompressor-2.4.7.jar
          yui_js:
              jar: %kernel.root_dir%/java/yuicompressor-2.4.7.jar
  </code></pre>
  
  <p>In <code>routing.yml</code> I have:</p>
  
  <pre><code>_assetic:
      resource: .
      type: assetic
  </code></pre>
  
  <p>I've seen this question <a href="https://stackoverflow.com/questions/7044631/symfony2-assetic-load-images-in-css">Symfony2 - Assetic - load images in CSS</a>, but I don't know if and how I can use <code>filter='cssrewrite'</code> and <code>filter='yui_css'</code> at the same time, or how to solve the problem.</p>
  
  <p>Basically if I could stop Symfony2 to prefix my CSS images paths with <code>/web/</code> the problem would be solved. Or, does anyone know what is the proper way to solve this problem in Symfony2?</p>
  
  <p><strong>UPDATE</strong>: I've noticed that even if I put url('something.png') the CSS doesn't get updated anymore when I load the page, so I might have messed up something with command line, I've also given commands like <code>php app/console assetic:dump</code> -- how to go back to the normal dev style of modify CSS and reload page?</p>
  
  <p><strong>UPDATE2</strong>: I discovered that <code>php app/console assetic:dump --watch</code> updates the assets automatically as they change. </p>