Support » Plugin: Perfect Images (Manage Image Sizes, Thumbnails, Replace, Retina) » PHP Memory limit exceeded – cannot upload bigger images

  • Resolved Alex R.

    (@dreamfish)


    Hi,

    I have problems uploading images > 1 MB to the wordpress media gallery when the plugin is enabled.
    Smaller images are properly working.
    I receive a “HTTP-Error”, and the image will not show up with a thumbnail in the media gallery.
    I tested with different browsers, all with the same result.
    I have defined 12 different image sizes with add_image_size() within the functions.php (this is a custom theme), and they are all needed due to an easy admin experience.
    My website provider said, that this plugin exceeds the php_memory_limit of 265MB. Is that possible?
    The site is running on NGINX, PHP7 and SSD drives, so it is no “cheap” provider, and they are specialized on WordPress.
    Can I reduce the memory consumption of this plugin, or are there any other tweaks?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hello,

    The problem is not what the plugin does, it is the process that follows it: WordPress creates the alternative images (12 images sizes) and if you use Retina or an optimization plugin then it’s one very long process. The bigger the image it is, the longer it takes.

    Did you have a chance to look at the PHP error logs? I am not sure that is my plugin specifically that exceed that limit, my plugin doesn’t do much except uploading that image, then WordPress does the rest.

    Thread Starter Alex R.

    (@dreamfish)

    Hi Jordy,
    thanks for the fast reply!

    So, after speaking with my webhoster, you’re right, it is not the memory limit.

    The following can be found in the error log:

    [05-Dec-2016 16:19:19 UTC] PHP Notice: Undefined variable: original_width in /home/wp/disk/wordpress/wp-content/plugins/wp-retina-2x/wr2x_retina-dashboard.php on line 278
    [05-Dec-2016 16:19:19 UTC] PHP Notice: Undefined variable: original_width in /home/wp/disk/wordpress/wp-content/plugins/wp-retina-2x/wr2x_retina-dashboard.php on line 278
    [05-Dec-2016 16:19:19 UTC] PHP Notice: Undefined variable: original_height in /home/wp/disk/wordpress/wp-content/plugins/wp-retina-2x/wr2x_retina-dashboard.php on line 278
    [05-Dec-2016 16:19:19 UTC] PHP Notice: Undefined variable: original_height in /home/wp/disk/wordpress/wp-content/plugins/wp-retina-2x/wr2x_retina-dashboard.php on line 278
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:
    [05-Dec-2016 16:19:19 UTC] Retina: This status is not recognized:

    Cheers,
    Alex

    Plugin Author Jordy Meow

    (@tigroumeow)

    All those errors (actually notices, they aren’t errors) are written in your logs to tell you that there is a problem with the metadata of your Media. So it’s not linked to the plugin at this point, it’s just that my plugin tells you that there is this problem, incomplete metadata. The upload process wasn’t successful until the end and the metadata messed up. Those media should be removed, or you can try to use the Regenerate Thumbnails no attempt to repair them.

    But right now we still don’t know what’s actually really happening, where the real error is coming from. That would be during the upload, and we would need to see what kind of errors happen during that time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Memory limit exceeded – cannot upload bigger images’ is closed to new replies.