In Drupal 8, I use this code inside my buildForm() method:
$form['medias']['file'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_location' => 'public://image_example_images/', '#multiple' => true, );
(Bad) Result: https://i.stack.imgur.com/ju0ZU.png
I would like know if it's possible to use a plugin of type "field widget" inside BuildForm() for call and use a field of Image type provided by the core of Drupal:
Thanks.