Make a map that can be read from the files
Use different neutral role labels and version names. Confirm the image content after choosing the file.
Connect the two sides
Write which visible person changes and the matching reference filename. Avoid using a single role label for two different images without a timing rule.
Example
Use Cast-A-profile.jpg and Cast-B-reference.jpg instead of two local files called Portrait.jpg.
Pass condition
The editor can match each original person to exactly one intended reference.