I suggest you first have to find the cause of duplication. You mention WhatsApp, if all wa images are uploaded from their folder on the device as well as the “original” (likely in the DCIM folder) then you have a duplicate.
You can probably check a pair of duplicates on the cloud and find one has a wa filename, smaller file size, or so.
One fix would be to delete or move all the media stored on the device by WhatsApp. You may still have to delete the wa images on the cloud.
You might experiment on a WhatsApp folder with this idea, as mentioned there may be downsides.