S
S
Sergey2016-07-27 11:05:36
symfony
Sergey, 2016-07-27 11:05:36

Why does assetic:dump with jpegoptim lose images in env=prod?

Images are loaded successfully in app_dev but "lost" in prod
In template
{{ jpegoptim("assets/design/site/img/1.jpg") }}');
In config

assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        ['AppBundle']
    read_from:      %kernel.root_dir%/../web/
    write_to:       %kernel.root_dir%/../web/
    filters:
        jpegoptim:
            bin: /usr/local/bin/jpegoptim
            max: 60
            apply_to: "\.jpe?g$"
    twig:
        functions:
            jpegoptim: { output: assetic/*.jpg }

As a result, after executing assetic:dump -e=prod and clearing the cache, the images are successfully uploaded to app_dev but are "lost" in prod

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-07-27
@karmis

Found a solution...

assetic:
    use_controller: true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question