phpsymfonyyui-compressor

Assetic css images have disappeared


I have this image: Symfony/web/bundles/BackendBundle/images/main.png

I enable yui compresor for this style: Symfony/web/bundles/BackendBundle/images/main.css, it orks fine.

I have this in config.yml: cssrewrite: ~

But images of main.css does not work, why?

I try this different formats:

background-image: url(/bundles/BackendBundle/images/main.png);
background-image: url(bundles/BackendBundle/images/main.png);
background-image: url(../images/main.png);

Solution

  • I have found the solution, I reply my question: {% stylesheets "bundles/BackendBundle/css/*" filter="cssrewrite, yui_css" %} I put cssrewrite in assetic declaration and relative path works