• Resolved girlgon1

    (@girlgon1)


    Hello,

    While trying to bulk resize, the following error occurs. What would be the missing server components that I would need to install? We are hosted through Hostgater, would I need to contact them? Thank you for any help (newbie here trying to help our school).

    Imsanity was unable to resize this image for the following reason: Insufficient memory (case 4) `/home2/ilapdxadmin/public_html/wp-content/uploads/2019/01/20181017_150644-1-1.jpg’ @ error/jpeg.c/JPEGErrorHandler/316. If you continue to see this error message, you may need to install missing server components.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    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

    Plugin Author nosilver4u

    (@nosilver4u)

    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?

    Plugin Author nosilver4u

    (@nosilver4u)

    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!

    Plugin Author nosilver4u

    (@nosilver4u)

    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).

    Thanks for the tip!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error: Insufficient Memory Case 4’ is closed to new replies.