I’m not a programmer. PHP understand very decent ??
But I wondered solutions renaming images with the same label ??
To supplement the file name of the image file ID.
PS: str_replace is there because I wanted renemad at the end of the filename
add_filter( 'mfrh_new_filename', 'my_filter_filename', 10, 3 );
function my_filter_filename( $new, $old, $post ) {
$new = str_replace(".jpg","-renamer-" . $post['ID'] . ".jpg",$new);
return $new;
}