How to change filename before it get saved without changing source URL using tamper plugin?
It seems it's not possible using tamper plugins (as far as I've tried).

As workaround, this can be achieved by using hook_file_presave(), for example:

/**
 * Implements hook_file_presave().
 */
function mymodule_file_presave($file) {
  if ($file-&gt;filename == 'ShowImageXML.asp') {
    $filename = date("ymd", $file-&gt;timestamp) . '-' . $file-&gt;filesize . '.jpg';
    $uri = 'public://images/' . $filename;
    $file = file_move($file, $uri);
  }
}


See also a feature request: #2596841