probably I have to add that I moved my app.php from web to my root, and /symphony/ is the root folder. so it is something wrong. and if I change it to:
Of course the image is broken, Is there any way to solve this? or I need to move the background image to twig template any way? if yes how can I have a background imgae for div?
I did run
assets:install and use cssrewrite filter in css tag. Css file itself is loaded from /bundles/mybundles/css but the images in css is still broken even with adding filter=‘cssrewrite’ in css tag. How the path in css file should be to load images from /bundles/mybundle/images?
as css file is located at /web/bundles/appbundle/css/style.css I guess for background image I should have a relative path to reach outside of /web/ folder like this?
but it doesn’t work yet, I have filter=‘cssrewrite’ in css tag tag too. please advice. probably I have to add that I am only editing the css file located at the path above after assets install, I did not edit the one in /Acme/Bundle/Resources/public/css.
when I have: {% stylesheets ‘bundles/appbundle/css/*’ filter=‘cssrewrite’ %}
the image path in /bundles/appbundle/css/style.php
is just …/images/top_bg.jpg
then the link becomes https://www.mysite.com/bundles/appbundle/images/top_bg.jpg 404 (Not Found)
but after dumping assets when I change it to:
{% stylesheets ‘css/*’ filter=‘cssrewrite’ %}
the link becomes https://www.mysite.com/symfony/bundles/appbundle/images/top_bg.jpg 404 (Not Found)
and the path in /css/xxxxstyle.css is:
…/…/bundles/appbundle/images/top_bg.jpg
but the image is actually in:
h t t p s ://www.mysite.com/symfony/web/bundles/appbundle/images/top_bg.jpg
I don’t think pointing the twig to ‘css/*’ is good idea for me, because I have two User and Admin bundle,