Search code examples
csssymfonyassets

SF2 - Proper place to store CSS and related images


Right now I have my CSS in: /web/css/ directory. It's also what Symfony Demo app uses.

Where should I store additional images used by CSS? Simply in /web/images/ or maybe in my src/AppBundle/something?

I notice some other files in /web/bundles/name/ - should I move everything there?

I'm sorry it may look like a simple and stupid question, but it's confusing...


Solution

  • Place it wherever you want it and wherever it can be loaded by the browser.

    Normally, web/ would be your server root. This means that only things in the web/ directory can be accessed by the browser.

    How you name the directories, subdirectories, files, etc. is all up to you. Make a nice choice :)