Random errors on uploading images on WordPress

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Virtualmin version 2.021
PHP 8.2 ( but was also on 7.4 an issue)
PHP-FPM mode

I get this error from time to time, sometimes when i’m uploading just 1 image, but when I batch upload 30 images, It does like 50 to 75 % without issues and others without an issue.

“The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. The recommended maximum size is 2560 pixels.”

Even with a 21kb image that is like 100x50 for exemple it sometimes goes south.
When I hard refresh, the picture is actually uploaded without an issue.

Would you mind posting your server specs? Mainly processor and memory. While WM/VM can run on minimal hardware, that doesn’t meant it is a good idea.

Doing something like running top while uploading might show if it is a system resource issue.

**Intel Xeon Processor (Skylake, IBRS), 8 cores
Running processes 330
CPU load averages 1.49 (1 min) 1.40 (5 mins) 1.55 (15 mins)
Real memory 14.01 GiB used / 16.12 GiB cached / 30.6 GiB total
Virtual memory 9.5 MiB used / 19.99 GiB total
Local disk space 80.57 GiB used / 69.48 GiB free / 150.05 GiB total

I’m testing with this now; seems to not have issues;
I’ll do some extra testing :slight_smile:

function wpb_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD' ;
$editors = array_diff ( $editors , array ( $gd_editor ) );
array_unshift ( $editors , $gd_editor );
return $editors ;
}
add_filter( 'wp_image_editors' , 'wpb_image_editor_default_to_gd' );

I did a quick search and found this. I’m mostly out of my element at this point though. Good luck.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.