Thumbnail Generation Alert! image_no_editor error
-
I have recently had the same problem with the FooGallery plugin 1.8.12 (most recent version at the time of writing), WordPress 4.1, PHP 5.4.5, apache2 web server as reported in a couple of other threads here. As no-one seems to have suggested a solution to my case, I am sharing it here.
In my case, the problem manifested itself as follows: the ‘Thumbnail Generation Alert!’ warning message appeared on the plugin page whenever I go there even though phpinfo() and WP would report that GD library is installed and is functioning with no issue. When going to FooGallery | Settings | Images | Run Tests, it would fail the test with the ‘image_no_editor’ error message.
After debugging the issue, in my case it turned that that JPEG support for GD library was not installed on my server, even though the GD library itself has been installed correctly and had PNG images support enabled. Because a JPEG image has been used in the tests by FooGallery, the _wp_image_editor_choose() builtin WP function returned false for JPEG, as PHP imagetypes() function called by WP_Image_Editor_GD::supports_mime_type(inherited by WP_Thumb_Image_Editor_GD) would indicate that JPEG is not supported.
So if nothing works for you, make sure that “php -r ‘print_r(gd_info());'” command indicates JPEG support on your server. Also, make sure you run correct php binary in this command: in my setup I had builtin php command that indicated JPEG is supported, however apache2 uses another php command located in /usr/local/php-5.4.5/bin, so in my case the proper command to reveal the issue was “/usr/local/php-5.4.5/bin/php -r ‘print_r(gd_info());'”.
In my case it was possible to recompile PHP 5.4.5 from sources as suggested by the “Compiling PHP with GD and libjpeg support” article that can be found using search. After doing so and running “make install”, the problem was gone: the tests would pass, the thumbnail images start getting generated and the warning is gone.
See also:
- The topic ‘Thumbnail Generation Alert! image_no_editor error’ is closed to new replies.