• Resolved Lakjin

    (@lakjin)


    I have a high traffic blog that posts often. Waiting for EWWW to optimize images for every post is not possible for us. As such, I have a feature request.

    Can you add a feature to disable automatic optimization of newly uploaded images and add a feature that allows us to enable a cron every X minutes to make EWWW go and optimize the images that have not yet been optimized? This way, EWWW won’t optimize images as they are uploaded but rather every X minutes in batch.

    Thanks!

    https://ww.wp.xz.cn/plugins/ewww-image-optimizer/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Already in dev, release imminent: https://ww.wp.xz.cn/support/topic/option-to-disable-real-time-hooks?replies=7

    For the second feature, it is on the roadmap for next release. For now, you have to manually specify the folder that you want the scheduled optimizer to scan. Then you turn on scheduled optimization, or run it via wp-cli using a regular cronjob. I recommend specifying the month folder if you have lots of images, like /var/www/wordpress/wp-content/uploads/2014/12/ instead of making it scan the entire media library everytime. The new feature as planned will automatically scan the current and previous month folders.

    Thread Starter Lakjin

    (@lakjin)

    Awesome, thanks!

    Thanks for implementing this.

    It seems the new option only removes the hook from the upload process.

    For me it is still firing new thumbnail generation (with EWWW active) when wordpress tries to display images in a new size with no thumbnail generated yet.

    So if a visitor loads a gallery page (with about 20 thumbnails) that wordpress has not generated yet, I get EWWW called 20 times and my site goes down.

    Plugin Author nosilver4u

    (@nosilver4u)

    It isn’t supposed to trigger at all, I’ll have to dig into that. Are you using a particular gallery plugin, or just the built-in WP gallery functionality?

    I’m using WooCommerce, so my ‘galleries’ are product category pages.

    Right now I’m displaying the same size thumbnails to Desktop and Mobile users, which ends up having long page load times for Mobile users.

    I’m trying to enable a new plugin that defines another 3 thumbnail sizes for various mobile devices… Because they are new sizes, none of the thumbnails are actually generated yet.

    So as soon as someone on a mobile client goes to a page that is optimized to use the new sizes, the thumbnail generation is being triggered.

    I’m not sure if the thumbnail generation is being triggered by the plugin that ads the additional sizes (PictureFill.WP) of if it’s being triggered by something in WordPress core. But whichever it is that triggers the thumbnail generation also ends up triggering EWWW optimizations.

    Plugin Author nosilver4u

    (@nosilver4u)

    are you using the version 1.2 implementation, or the v2 from github?

    Plugin Author nosilver4u

    (@nosilver4u)

    nevermind, I’m not seeing anything in PictureFill.WP that would trigger EWWW, and I’ve tested media uploads and they don’t show up in the optimized images table at all, not even the resizes.

    Can you replicate the behavior, and then check the Show Optimize Images area on the Bulk Optimize page to see if those images are actually in there, or if the slowness is just from PictureFill.WP? The plugin author mentions that initial image generation could be a bit slow, so perhaps that is all you’re seeing?

    I’m using the version available from ww.wp.xz.cn (extension version 1.3.5 / picturefill 1.2)

    I have to apologize… It seems the 100% load on my server is within php-fpm when I run load the page, and not in the external tools that would be being called by EWWW optimization.

    So it seems the new feature does work as intended, and EWWW isn’t being called outside of the batch optimize mode now.

    So the ideal solution would be to have the PictureFill author not try to generate thumbnails on-the-fly.

    For now, I’ll just manually add the new sizes outside of PictureFill, then run EWWW bulk optimizer, then only enable PictureFill.WP after all the thumbnails are up-to-date.

    Thanks again for your support, and the new feature, and sorry for the wild goose chase on this last issue.

    Best,

    -Eric

    Plugin Author nosilver4u

    (@nosilver4u)

    I did note that he recommends using the Regenerate Thumbnails plugin to keep from having them generated on-the-fly. Might be worth a try, I’ve used it a little bit in the past.

    Yeah, the problem is on production for me with something like 1000+ resizes to do, I can’t finish bulk process before someone happens to visit the wrong page and bring the site to it’s knees.

    Plugin Author nosilver4u

    (@nosilver4u)

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Feature request: disable automatic optimization’ is closed to new replies.