How to show the uploaded managed_file in the edit page?
Inspecting the $foo variable showed that I was supposed to use just $foo-&gt;image instead of $foo-&gt;image-&gt;fid.

Probably because I have the following lines in my _form_submit:

if (isset($form_state['values']['image'])) {
    $file = file_load($form_state['values']['image']); 
    $file-&gt;status = FILE_STATUS_PERMANENT;
    file_save($file);
    file_usage_add($file, 'foo', 'foo', $foo-&gt;tkid);

    $foo-&gt;image = $file-&gt;fid;
  }


Notice the part that says $foo-&gt;image = $file-&gt;fid;