Unable to upload png files greater than 1mb with Smush Pro

Always receive an HTTP error with Smush Pro activated. For some strange reason whenever Smush Pro is activated I am unable to upload any png images that are larger than 1mb in size. jpeg images upload perfectly fine, it’s just png images.

Disabling Smush Pro fixes the issue.

  • Ash
    • Code Norris

    Hello stigan

    Thanks for enabling support access. I can see when I tried to upload a large image which is bigger than 1MB, it returns a 500 internal server error and that’s why the upload was not successful. So, we need to know this error.

    Would you please enable debug mode and check if there is any error? To enable debug mode please go to wp-config.php and change

    define( 'WP_DEBUG', false );

    to

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    Now upload another big png image. That will create a file called debug.log inside wp-content folder. Open that file, check the very bottom and you will see the latest errors. Please send me those.

    Have a nice day!

    Cheers,

    Ash

  • Nithin Ramdas
    • Support Wizard

    Hi stigan,

    On checking further it seems like you have already share FTP login credentials in the notes, so I went ahead and checked the debug logs.

    Unfortunately, the debug logs only have warnings, and notices which shouldn’t be causing the issue notice. I also tried adding the following rule inside wp-config.php to see how it behaves but the issue still exists:

    define( 'WP_SMUSH_ASYNC', false );

    This still looks more related to HTTP error, I created an info.php file to check the current server resources by accessing the info.php via the browser as following:

    yourWebsiteURL.com/info.php

    It seems like the Memory(memory_limit) is at 128M which is very low, and that could be one of the reasons for the issue to occur when the Smush is enabled.

    I created a php.ini file in the root folder and tried to increase the resources to the following:

    upload_max_filesize = 128M
    post_max_size = 256M
    memory_limit = 512M
    file_uploads = On
    max_execution_time = 300

    But unfortunately, the memory resources aren’t getting increased. It seems like your server doesn’t support increasing the resources via the php.ini file. I also tried to increase via .htaccess file but it was throwing a 500 error.

    Could you please get in touch with your hosting provider, and ask to increase the server resources to the above-mentioned rules, and then check whether you still have issues regarding uploading new images?

    Looking forward to hear what the hosting provider has to say regarding this. Please let us know how that goes. Have a nice day ahead.

    Kind Regards,

    Nithin