I had situations when I saved all the files in / web (for example, / web / js) and others, where I saved them in the "Assets" bundle.
If you are developing a package that will be reused in many projects, it makes sense to store assets in this package. I think you will then publish / install these assets to a web folder using the command line. For example, suppose you have a BlogBundle that requires a specific css. You would save css in this package, so the next time you use BlogBundle for a project, you can easily reuse css.
As with many other things with Symfony2, your personal preferences play a big role in these decisions. I recommend staying constant, but with where you store your assets. The need to manage assets shared in three different places (network, AssetsBundle, other packages) can be a big headache. So choose a location and try to stay consistent.
As for accessing assets from the app / resources ... you can use Assetic for this. I am not very familiar with this, but I believe that you can upload assets from anywhere in your project. I would recommend taking a look at the main Assetic code (see vendor\Assetic ) instead of the Symfony2 Assetic helper, because you get a better idea of ββwhat is possible.
Steven mercantante
source share