Support » Plugin: Imsanity » Not working with WordPress 4.9.2

  • Hello,

    I have a form on my site that logged in users can submit content to, including an image. The image downloads directly into my media library and is set as the featured image on the post automatically.

    I have tried setting the “images uploaded within a page/post” to 500 width and 500/9999/0 height.
    And the “images loaded directly to media library” as 500 width and 500/9999/0 height.

    I tested this with each setting (3 settings each for page/post and media library setting) and it’s not working.

    Please help!

    https://sugarfreegallery.com/

    The form is in the menu as titled “Submit”.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Indeed, it could hook into the process later, but it doesn’t. I implemented the same code in the EWWW Image Optimizer, and what I found out, was that if you resize the image later, it uses a lot more memory.
    I don’t know exactly why it does that, although I have my theories, but it does.

    There are a lot of other plugins that resize images during upload, and I’m not sure what other plugins are doing, but I know Imsanity and EWWW IO both use the wp_handle_upload filter.

    Ninja Forms could just replicate the apply_filters() call for wp_handle_upload here: https://developer.wordpress.org/reference/functions/_wp_handle_upload/

    Ok, sorry I’m way out of my league here.

    So if you hook the process here: wp_update_attachment_metadata(), like the ninja guy said, it’ll use a lot more memory?

    Which is something I definitely do not want. This is exactly why I downloaded your plugin because yours replaces the original one with the resized one.

    I’m going to reach out Ninja Forms again with your suggestion.

    THANK YOU FOR YOUR TIME!

    Plugin Author nosilver4u

    (@nosilver4u)

    Oh yeah, I didn’t mean for you to do anything with that, other than pass along the information to Ninja Forms.

    To answer your other question though: yes, it uses more memory if deferred until the wp_update_attachment_metadata filter.

    The main reason, I think, is that the original image is larger still when the thumbnails are generated, so it uses more memory loading the original for the resize generation. It’s usually most problematic when someone uploads images 5MB or larger. A JPG of that size can use up 10x more memory than it’s filesize. Please note, this is “working memory” (RAM), not “storage memory” (disk space). In other words, it’s the “temporary” memory that programs use when they are actively working on something, and it is much more limited than the available storage.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Not working with WordPress 4.9.2’ is closed to new replies.