1
我只是試圖讓LiipImagineBundle工作。Symfony2 LiipImagineBundle不能在Nginx上工作
#app/config/confiy.yml
# liip_imagine Configuration
liip_imagine:
resolvers:
default:
web_path:
web_root: %kernel.root_dir%/../web
cache_prefix: media/cache
loaders:
default:
filesystem:
data_root: %kernel.root_dir%/../web/
#....
#...
filter_sets:
medium:
quality: 100
filters:
thumbnail: { size: [280, 280], mode: outbound }
#....
#...
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
upload_folder: "uploads/"
如果使用:
app/console liip:imagine:cache:resolve /uploads/photos/3/01.jpg --filters=medium
它做工精細。
但使用後:
#src/Hy/PhotoBundle/Resources/views/Photo/index.html.twig
{% for entity in pagination %}
{% set photo=upload_folder~entity.fileManaged.uri %}
<img src="{{ asset(photo | imagine_filter('medium')) }}" />
{% endfor %}
圖像不渲染,路徑根本就沒有發現錯誤。
任何提示?
http://i.stack.imgur.com/rVbwv.png