How to insert an image in an Symfony form file input (the image stored with entity)? I can upload and submit a file, but can't retrieve it on form (in Front I can...)
I have a form with a FileType input named imageFile:
$builder->add('imageFile', FileType::class, array('label' => 'Photo'));
I am using the VichUploaderBundle module to manage files
When I submit the form, the image is correctly uploaded and the filename is stored in database as expected. I can then display the picture in Front End, no problem with that.
The problem is that if I come back to the form, the picture is not attached to the field, I have to upload a picture each time I submit the form.
How can I load the picture stored and attach it to the input, so I don't need to attach it again and again?
Sorry for my broken english and also for my begginer level on Symfony! :)