I'm still not quite sure I see it. What macOS are you using. What iOS are you using?
It sounds like you are not using the Mac Photos app in the transfer-- is that right? Are you using Image Capture to transfer pictures to a Finder folder? And then the error occurs when you try to drag files from a Mac Finder folder to the external drive-- is that right? There are so many ways to "transfer" things, that it helps if you an be specific.
Have you transferred other files to the drive-- does that work OK? Is this only about picture files? It's beginning to sound like the iMac's USB port might be a problem. Have you tried other ports?
Have you used Virus hunters or Mac Cleaners on the iMac?
As long as you're not using the drive on Windows, then APFS is the best choice of format. If it's a pretty old Mac, and you're running an old OS, Mac OS Extended (Journaled) is good. It's best if it's not encrypted, and Case Sensitive format can't be used.
You should check Permissions on the drive. You can open the Info Panel for the drive by selecting it and using command-i. An APFS format has an "Ignore Permissions" box that needs to be checked, for instance.

Have you used the Disk Utility app to do a First Aid check on the drive?
With all that, try these things to help narrow things down:
- Restart the computer (of course)
- Re-start in Safe Mode. This bypasses certain potentially disruptive processes, and it often helps. Safe Mode is different for different computers, so see this:
Start up your Mac in safe mode - Apple Support
- Make a new user and see if the same problem recurs with it. This is a bit harder, because a new user can't access a different user's stuff. You would need to temporarily move your Library out of your own user's Pictures folder up to the general "Users" folder.
Let us know what happens…