Default value of a 'managed file' field I created an edit custom form (of a node) via a custom module. From this form, I have a "managed file" field (for one picture) and I set his default value to a fid;
However, when my form is rendered, the "managed file" field doesn't show the image ratached. I don't understand why

My code : 

$form['project']['image'] = array(
  '#type' =&gt; 'managed_file',
  '#title' =&gt; t('Image'),
  '#default_value' =&gt; 10, //Set 10 for the test, the fid "10" exist, I checked
);


My form rendered: 



As you see, no image is loaded whereas the default_value is set to an existing fid (10)
To render the existing image, please use the below code

$form['project']['image'] = array(
  '#type' =&gt; 'managed_file',
  '#title' =&gt; t('Image'),
  '#default_value' =&gt; array(10),
);


You need to give the fid in array format. Please try it and let me know whether you got the result