Custom Submit Handler issue in getting file
You need to use following code to get it

$target_id =$form_state-&gt;getValue('field_name');//get the target_id from it 
    $file = \Drupal\file\Entity\File::load($target_id); //load the file and its attribute.
            $file_image= '&lt;img src = "' . \Drupal\image\Entity\ImageStyle::load('large')-&gt;buildUrl($file-&gt;getFileUri()) . '" /&gt;';//load the large image