Hello, may I chime in on the topic.
I was able to hunt the issue down by a local installation of Wordpress (official docker image). The problem is not lack of memory, but a missing PHP extension, and no test exists to catch it. Suggestion for a fix:
Index: wpdiscuz-media-uploader/includes/class.WMUHelper.php
<+>UTF-8
===================================================================
--- wpdiscuz-media-uploader/includes/class.WMUHelper.php (date 1551308602000)
+++ wpdiscuz-media-uploader/includes/class.WMUHelper.php (date 1551308602000)
@@ -458,6 +458,9 @@
}
public function imageFixOrientation($filename) {
+ if (!function_exists('exif_read_data')) {
+ return;
+ }
$exif = exif_read_data($filename);
if (!empty($exif['Orientation'])) {
$image = imagecreatefromjpeg($filename);