I am experiencing a really strange behavior I have never seen before with Drupal. I am able to upload files of every type but not images. The files system is public. The problem appears on the local test server and on the live server.
Error message: The image upload widget shows the standard error box logging: **The file xyz.jpg could not be uploaded.
- This value should not be null**
This issue appears on the whole site on every image of the file field widget within the backend. Even the file upload for Drupal's "File Archive" does just work with every other file type than 'jpg', 'jpeg', 'gif', 'png' file types.
The issue appeared after updating to the "web/" file structure while also updating the core to 8.8. I tried to update to 8.9.12 including every module installed but the error when trying to upload a file stays.
I rechecked all the settings regarding "tmp folder" and also tested the folder access rights (chown, chmod). It is set to 777.
I updated the database (drush updb) and also rebuild the cache (drush cr).
No PHP error log is created (not in Drupals Watchdog or the apache log).
I am sure that it is not a configuration issue as I am able to upload files that are not image files without problems. Another interesting bit is that when uploading a file it is actually created in the final sites/default/files location. The file also has the correct owner and access rights.
I could not find a related issue when researching nor I am able to come up with another idea. I even tried to change the file system to private, created new entities with image or file fields and tried different image upload widgets - nothing seems to work.
Any help is greatly appreciated.