How to set the file status of files uploaded through theme settings to permanent?
You need set status FILE_STATUS_PERMANENT file when form submit

function mymodule_custom_form_submit($form, &amp;$form_state) {
  if (isset($form_state['values']['images'])) {
    $file = file_load($form_state['values']['images']);

    $file-&gt;status = FILE_STATUS_PERMANENT;

    file_save($file);
  }
}