For unkown errors, it is the best to check your logfiles (Nextcloud, webserver, system). From Nextcloud-side, an app could prevent certain extensions to be uploaded: https://apps.nextcloud.com/apps/files_accesscontrol (by default not enabled and configured to do this)
Could also be on the webserver configuration, or other security modules (centos->SELinux). But if they do something, you should find some traces in the logfiles (perhaps some loglevels must be changed to get more meaningful messages).
Same problem here. No matter where I upload from - webdav, web, or iOS app - images trigger that error. Haven’t found errors on nginx nor on nextcloud logs.