but like
but like

Reputation: 193

assetic:dump command not dumping images

As far as I know, the command php app/console assetic:dump should take everything from app/Resources/public, process it if necessary (say Sass file -> CSS file), and dump it into the web/ folder. When I run the command, my javascript files and css files get transferred correctly, however, my images do not. They do not get transferred to web/ at all. How can I get the images to transfer from my non-public directory to the public one on assetic:dump?

My file structure:

+-symfony/
  +-app/
    +-Resources/
      +-public/
        +-css/
          //All of my CSS files
        +-javascripts/
          //All of my JS files
        +-images/
          //All of my image assets

My layout file looks like so:

{% stylesheets
  'css/bootstrap_loader.css.scss'
  'css/bootstrapValidator.min.css'
  'css/style.css.scss'
  'css/learners.css'
  'css/stately/*'
  filter='cssrewrite'
%}
<link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}

{% javascripts
  'js/jquery-1.11.2.min.js'
  '@bootstrap_js'
  'js/landing_page.js'
  'js/homepage_video.js'
  '//use.typekit.net/rah2apm.js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}  

Upvotes: 2

Views: 2149

Answers (1)

Michael Sivolobov
Michael Sivolobov

Reputation: 13340

You are wrong. Assetic is not the same as assets.

Assetic is a library that can compile your JS or CSS with some filters.

Assets is your resources.

Try to run:

php app/console assets:install --symlink

It will create symlink folder inside web/ directory that will point to your bundle's Resources/public folder.

If you omit --symlink option it will hard copy all your assets once and you will need to run this command every time you changed your assets.

Upvotes: 4

Related Questions