The cssrewrite filter produces wrong urls after the rewrite: i have my bundle which contains one .less file located in Resources/public/less/common.less
I also have one image,located in Resources/public/images/colorfulbg.jpg
i run from the command line :
php app/console assets:install web --symlink
which produces in the web directory the correct public structure:
web
+--bundles
+--mybundle
+--less
| +--common.less
|
+--images
+--colorfulbg.jpg
in my template i have the following:
{% stylesheets 'bundles/mybundle/less/*' filter='cssrewrite,less' %}
<link rel="stylesheet" href="{{ asset_url }}" type="text/css" />
{% endstylesheets %}
That folder just contains one .less file , which is simply:
@bg: #f4f4f4;
body
{
background-image: @bg url(../images/colorfulbg.jpg);
}
There is something wrong, since the rewrited background path is:
url(../../bundles/mybundle/images/colorfulbg.jpg);
and therefore the background is not applied
What am i doing wrong?
I am using symfony 2.3 and assetic bundle 2.3 Thank you
background-image: @bg url(images/colorfulbg.jpg);
? – nietonfir