• Resolved Gal Baras

    (@galbaras)


    When Image Regenerate & Select Crop is installed together with EWWW Image Optimizer, it seems to ignore thumbnail sizes disabled by EWWW (Resize tab).

    Can you please make the two plugins work together well? This may just be a matter of hook priority, but at the very least, look for these settings and copy them during activation, unless that’s already been done once (I hope this is clear).

Viewing 6 replies - 31 through 36 (of 36 total)
  • Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hello,

    I will take a look at this.

    @nosilver4u, the actions sirsc_attachment_images_processed and sirsc_image_processed are triggered for different purposes, and in different contexts. The sirsc_attachment_images_processed is triggered when all the image sizes have been changed/updated, but sirsc_image_processed is triggered when a specific image size has been changed (the one that the user is selecting).

    I am not sure that it would be correct to trigger the “all sizes changes” on each “single image size change”, which is the case at line 2920 you mentioned.

    Maybe I do not understand completely why you would need the “all sizes changed” action triggered at that specific point. With what I understand currently, I think that perhaps it would help if you hook into the sirsc_image_processed action for the extra computation your code would perform, and if you need the metadata to be passed to this hook, I can add it there too, or even create another hook for you to work with for that specific piece of execution.

    Let me know if this makes sense.

    Regards,
    Iulia

    • This reply was modified 4 years, 11 months ago by Iulia Cazan.

    The main issue that arises in EWWW IO trying to use sirsc_image_processed is that it runs multiple times when IRSC is regenerating thumbs for all sizes. So even if EWWW IO hooked into it for the case when the user regenerates a single size, the same code in EWWW IO would end up running multiple times during the ‘all’ sizes regen. What we’re wanting to do is just run once after IRSC is done with the image, regardless of how many sizes have been processed.

    If you don’t feel right using the sirsc_attachment_images_processed hook after regenerating a single size, you can certainly use one with a different name, but having the same parameters as sirsc_attachment_images_processed will make it simpler for us.

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    I understand. I will add a new hook sirsc_attachment_images_ready (same arguments as sirsc_attachment_images_processed) that can be used in EWWW IO. I think it’s better to have two separate hooks, I am only concerned that other plugins might use these too, so maybe it’s easier to just hook on the one that is needed.

    I intend to add these lines in the next push https://imgur.com/a/lYJ6FjC.
    Let me know if you can test in your instance by adding these like in the meanwhile.

    Thanks!
    Iulia

    I tested it with sirsc_attachment_images_ready added into my local copy of IRSC and updating EWWW IO to use the same, and it worked just as expected!
    I’ll be on vacation for the next couple weeks, but will include the update with version 5.1.4 in January.

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    This is great! Thank you for the update!
    Happy Holidays!

    Thread Starter Gal Baras

    (@galbaras)

    And thank you for releasing the update, Iulia. Happy holidays to both of you awesome people.

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Integration with EWWW Resize settings’ is closed to new replies.