In that case, the error message is slightly misleading.
The real problem is the memory, you probably just need to increase the PHP memory_limit setting a bit–image manipulation/resizing can use a lot of memory.
Hi,
I am having the same error on one site that is using Imsanity where PHP memory_limit is set to 256MB.
After reducing images locally, they uploaded with no HTTP Error.
Can you suggest any other things to try to get Imsanity working again.
Thanks
You need to increase it further than 256M if you are still having the same error.
Hi,
I contacted Hostgator support, and the tech added the following to the WordPress WP-include > functions.php
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); }
PHP memory_limit is still set to 256MB
Just testing now, appears to work.
Hmmm, this file is over-written on update?
That’s the first time I’ve actually been impressed by Hostgator support in a long time. Not that it’s the most elegant way to do that, but switching to Imagick is typically more memory efficient than the standard GD library used for image resizing. Kudos to them for going that route rather than just catering to the limitations of GD.
I was impressed also. They sometimes balk at going in and fixing, but this fellow was terrific.
I’m wondering if this will be over-written next time I update WordPress?
And, if so, should I be looking at a plugin that selects Imagick?
THanks! Imsanity is a lifesaver!
It probably will be overwritten, but if he’s already enabled the imagick extension for PHP, the code itself is probably not necessary. On the flip side, the code would break if the imagick extension was NOT working/enabled. WordPress normally auto-detects imagick and uses it rather than GD on every site I’ve ever had. So I would say just to keep it in your mind to if image uploads break when you update WP next (5.1 is coming soon).