I'm using Vich Uploader Bundle to submit one image per form, I'd like to be able to display a thumbnail of the image before it's uploaded because as it is, the image is uploaded and nothing is shown or done to indicate that anything happened. I tried setting inject_on_load
to true but this just puts the url of the image in the element that it appears.
config.yml
# Vich File Uploader
vich_uploader:
db_driver: orm
mappings:
image:
uri_prefix: /uploads/listings/images
upload_destination: '%kernel.root_dir%/../web/uploads/listings/images'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true
avatar_image:
uri_prefix: /uploads/avatars
upload_destination: '%kernel.root_dir%/../web/uploads/avatars'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true
agency_logo:
uri_prefix: /uploads/avatars
upload_destination: '%kernel.root_dir%/../web/uploads/avatars'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true