While uploading an image I got:

Tried to add the following to www/wp-content/themes/star/functions.php
:
1 2 3 4 5 6 7 | // completely disable image size threshold add_filter( 'big_image_size_threshold' , '__return_false' ); //switch to GD add_filter( 'wp_image_editors' , function ( $editors ) { return [ 'WP_Image_Editor_GD' , 'WP_Image_Editor_Imagick' ]; }); |
but it did not help.
and installed PHP GD module:
1 2 | sudo apt-get install php7.4-gd sudo service php7.4-fpm restart |
but it did not help.
GD module is enabled:
1 2 3 4 5 6 7 8 9 10 11 12 | <?php // Show all information, defaults to INFO_ALL phpinfo(); // Show just the module information. // phpinfo(8) yields identical results. phpinfo(INFO_MODULES); print_r(gd_info()); ?> |

https://developer.wordpress.org/reference/hooks/big_image_size_threshold/
https://stackoverflow.com/questions/64157086/how-to-override-suggested-maximum-size-is-2500-pixels-on-media-upload-page-w
https://www.wpbeginner.com/wp-tutorials/how-to-fix-post-processing-of-image-failed-error-in-wordpress/
https://wordpress.org/support/topic/wordpress-image-upload-error-post-processing-of-the-image-failed/
https://vancebell.com/blog/fix-the-wordpress-error-post-processing-of-the-image-failed-likely-because-the-server-is-busy/
Enable PHP modules for a specific user
https://stackoverflow.com/questions/75358624/enable-php-modules-for-a-specific-user