我想在我的视图中添加资产图像。但是如果我加载页面图像将不会加载..
配置:
framework:
esi: ~
translator: { fallback: "%locale%" }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: "%kernel.debug%"
form: true
csrf_protection: true
validation: { enable_annotations: true }
templating: { engines: ['twig'], assets_version: "1.0.0" }
default_locale: "%locale%"
trust_proxy_headers: false # Whether or not the Request object should trust proxy headers (X_FORWARDED_FOR/HTTP_CLIENT_IP)
session: ~
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
read_from: %kernel.root_dir%/../public_html
write_to: %kernel.root_dir%/../public_html
use_controller: false
#bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
index.html.twig
<img src="{{ asset('images/menu-park.gif') }}">
要安装我运行的资产:
php app/console assets:install public_html --env=dev --symlink
我是不是忘记了什么?