webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Find Duplicate Report Media False Positive with Similar File Names

Open samiona2 opened this issue 4 weeks ago • 1 comments

When file names of two different but related images are named: someMonument.jpg someMonument_2.jpg

or someMonument.jpg someMonument_back.jpg

The algorithm flags these are duplicates even though they are completely different images.

samiona2 avatar Dec 11 '25 22:12 samiona2

Yes, that is expected.

The "find duplicate" tools are all designed to find "potential duplicates". In this case (media) the system only compares the file name for a close match. It's for you to decide if they are actually duplicates on your site. It is always challenging to be 100% accurate declaring records as duplicates.

If they are not duplicates you can:

1 - ignore them 2 - change the file name more significantly (eg use random codes as file names) 3 - for media duplicates always add a unique "descriptive title". Then they will not be regarded as duplicates.

kiwi3685 avatar Dec 11 '25 23:12 kiwi3685

This is working as designed. webtrees only compares the titles of the images.

It should be noted that to comply with accessibility standards, images on a page should all have unique titles. webtrees can't do this for you. You need to select the names yourself.

If you have two images called "Monument", then it would be good practice to rename them to something like "Monument (front)" and "Monument (back)".

On a related theme, it is entirely valid to have two media objects refering to the same media file. For example you could have the same photo used in two different media objects, with titles:

  • "Jack (left) with his older brother Paul"
  • "Paul (right) with his younger brother Jack"

fisharebest avatar Dec 14 '25 22:12 fisharebest