I have a problem with an image asset in symfony2, which I defined as a background in the css file. But, The image is always not found by the browser.
Here's my stylesheets block from the base layout :
{% stylesheets '@FsHomeBundle/Resources/public/css/common.css'
'@FsHomeBundle/Resources/public/css/main.css' filter="cssrewrite" %}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" />
{% endstylesheets %}
And here's my css:
.header{
background-image:url('../images/hdbg.png');
}
The image is located in src/Fs/HomeBundle/Resources/public/images/hdbg.png
Note: I tested also without cssrewrite filter , and it didn't work either, I tested changing the url as well.
Did anyone encounter this problem before?
Edit Note also that I'm working in /app_dev.php , and I do a assets:install and assetic:dump and also cache:clear every time I make a test.
app_dev.php/bundles/fshome/images/hdbg.pngandapp_dev.php/web/bundles/fshome/images/hdbg.png... All of theme show a ResourceNotFoundException... But the image is located in/web/bundles/fshome/images/hdbg.png