Error loading images for duplicate ID Image Server

Hello,everybody.

We are using Image Server version 3.6.10.3 on Omeka S version 3.1.2, sometimes we can’t upload images because a duplicated ID on media table.

{92744]: SQLSTATE[23000]: Integrity constraint violation: 1062
Duplicate entry
‘1697/Galeria_1_Version_publica__Barrientos__y_BCA…’ for
key ‘UNIQ_6A2CA10C5CC5DB90’

Sometimes we use the same image in different items, even the same image in the same item if we try (I know it doesn’t make sense) and there’s no problem, in storage_id field the system appends a consecutive number.

We changed the Media identifier from ID to Filename in Image Server module but the problem still occurring.

Any light will be appreciate, thanks.