मैं VichUploaderBundle का उपयोग अपने मीडिया फ़ाइलों को अपलोड करने के लिए और मैं AvalancheImagineBundle उपयोग करने के लिए मेरे टेम्पलेट में अंगूठे बनाना चाहते हैं। यह कैसे किया जाना चाहिए?VichUploaderBundle और AvalancheImagineBundle
मैं अब इस अधिकार है:
<td><img src="{{ vich_uploader_asset(entity, 'image') | apply_filter('my_thumb')}}" alt="{{ entity.nombre }}" /></td>
लेकिन उत्पादन होता है:
<img src="/app_dev.php/media/cache/my_thumb/images/uploads/392158_10150441208223772_580903771_8591661_774015725_n.jpg" alt="Froga"/>
यह मेरा config.yml है:
# Vich Uploader
vich_uploader:
db_driver: orm
twig: true
gaufrette: false # set to true to enable gaufrette support
storage: vich_uploader.storage.file_system
mappings:
uploads:
uri_prefix: /images/uploads
upload_destination: %kernel.root_dir%/../web/images/uploads
namer: ~ # specify a file namer service id for this entity, null default
directory_namer: ~ # specify a directory namer service id for this entity, null default
delete_on_remove: true # determines whether to delete file upon removal of entity
inject_on_load: true # determines whether to inject a File instance upon load
avalanche_imagine:
source_root: %kernel.root_dir%/../web/images/uploads
web_root: %kernel.root_dir%/../web/images/uploads
cache_prefix: media/cache
driver: gd
filters:
my_thumb:
type: thumbnail
options: { size: [120, 90], mode: outbound, quality: 100, format: png }
कोई मदद या सुराग?
लेकिन आउटपुट यह सही नहीं है: – ikerib
यदि आप देव मोड में हैं तो यह app_dev.php जोड़ देगा। पहली कॉल छवि उत्पन्न करती है, दूसरी कॉल और बाकी 301 जेनरेट की गई फ़ाइल पर रीडायरेक्ट होती है। – Michal