• Resolved dajanas

    (@dajanas)


    Hello,

    every time I open WordPress, I see a hint bar at the top with the words

    “The EWWW Image Optimizer has detected excessive re-optimization of multiple images Please use the Tools page to Show Re-Optimized Images. Reset Counters”

    I have already used “Reset Counters”, so the bar has disappeared. But it keeps popping up – why? This is quite annoying and I haven’t found a way to hide the bar or solve this “problem” (seems to be some kind of problem, I guess?).

Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Ultimately, the problem lies in the theme, the trace log you provided is pretty clear. Now if that trace log is different than all the rest, maybe we have a different issue, but I’m just going off the info you provided.

    So let me break this down a bit further:
    The problematic code starts in the filter_image_downsize() function/method, which is in /is/htdocs/wp1111111_ABCDEFGH/www.abcdefghijkl.de/htdocs/wp-content/themes/exampleblog-v1_04/include/plugin/filosofo-image/filosofo-custom-image-sizes.php
    On line 97, it calls generate_attachment(), which is located in /is/htdocs/wp1111111_ABCDEFGH/www.abcdefghijkl.de/htdocs/wp-content/themes/exampleblog-v1_04/include/plugin/filosofo-image/filosofo-custom-image-sizes.php
    On line 157 of THAT file, it hands things off to the save() method of the WP_Image_Editor_Imagick class, so the “trouble” is before that, and in one of those two files.

    If you’re able to debug it and nail down what is going on, great! If not, you may need a developer to fix the glitch in the theme.
    If the file didn’t change, EWWW IO wouldn’t re-optimize it, but somewhere in there, the existing, optimized version of those images is being overwritten, and from the trace log, the theme is where the glitch lives.

    Thread Starter dajanas

    (@dajanas)

    Hmm, but why does the problem still occours (the hint bar) even when I deactivate optimization for this image size within EWWW?

    Plugin Author nosilver4u

    (@nosilver4u)

    Because the images aren’t generated via wp_generate_attachment_metadata(), which is what normally would generate thumbnails and registered sizes. Only in that hook does EWWW IO have any concept of what registered size is being optimized. In this particular case, the theme is using the WP_Image_Editor interface directly, which completely circumvents any notion of “registered and/or disabled sizes”.

    Plugin Author nosilver4u

    (@nosilver4u)

    I’ve been trying to think of a way that you could stop EWWW IO from showing that notice, as there isn’t a “kill switch” for the notice, other than fixing the underlying problem.
    Then I remembered that we DO have a way to completely suppress the WP_Image_Editor integration with one of our overrides (see more at https://docs.ewww.io/article/40-override-options).
    You can add this to your wp-config.php:

    define( ‘EWWW_IMAGE_OPTIMIZER_DISABLE_EDITOR’, true );

    I want to be clear that this doesn’t solve the issue, and your theme will continue to re-generate those sizes during the page load process, which slows down your site, and also results in delivering (some) un-optimized images.
    But it lets you ignore the problem until you have the time and resources to resolve it.

    Thread Starter dajanas

    (@dajanas)

    Thanks, but I really want to solve the problem. Well, it seems that I have to get rid of YARPP in this case. The problem occoured when I made this custom template which shows related posts under a post – maybe I should just get rid of those related posts, because I am not that familiar with code in terms of such things like wp_generate_attachment_metadata or the filosofo-plugin.

    Thread Starter dajanas

    (@dajanas)

    Just for your information: I uninstalled YARPP and the problem has completely disappeared.

    Plugin Author nosilver4u

    (@nosilver4u)

    That isn’t surprising, as the PHP trace showed that the bug in the theme was triggered by an image URL request from YARPP.
    Let me know if you need anything else!

    Thread Starter dajanas

    (@dajanas)

    Thanks!

    Hi,

    I experience the same issue and here is my log from EWWW plugin:

    ...wp-content/uploads/2020/09/BIQU-BX-Auto-Leveling-100x100.gif
    Number of attempted optimizations: 6
    PHP trace:#0 ewww_image_optimizer() called at /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/ewww-image-optimizer/common.php:7117
    #1 ewww_image_optimizer_resize_from_meta_data() called at /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/ewww-image-optimizer/classes/class-ewwwio-media-background-process.php:99
    #2 task() called at /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/ewww-image-optimizer/classes/class-ewwwio-background-process.php:306
    #3 handle() called at /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/ewww-image-optimizer/classes/class-ewwwio-background-process.php:186
    #4 maybe_handle() called at /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php:287
    #5 apply_filters() called at /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php:311
    #6 do_action() called at /var/www/vhosts/domain.com/httpdocs/wp-includes/plugin.php:478
    #7 do_action() called at /var/www/vhosts/domain.com/httpdocs/wp-admin/admin-ajax.php:191

    Do you think it’s also the theme in my case ?

    Thanks in advance,
    Mike

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Annoying notice bar about excessive re-optimization’ is closed to new replies.