Support » Plugin: Smush Image Compression and Optimization » [Plugin: WP] Auto smush times out and bulk is impractical

  • We’re using this plugin on a high traffic, high volume site with TONS of images.

    Lately our writers have been complaining that image uploads are slow and/or timing out, and bulk smush finds 13K images and wants 500 hours to complete, so we had to deactivate the plugin for the time being.

    After commenting out the filter on wp_generate_attachment_meta_data and adding the code below at line 6 of the bulk.php file, we are able to run the plugin without disrupting media uploads, and use the bulk smusher to only smush images uploaded in the last week (these numbers are under 500/20 min, much more realistic.)

    You could easily adapt the code to accept a start date as a get param, or even work it into the form. This is what we are using but by no means publishable, just figured the plugin author might like the food for though-

    if (!$_GET[‘all’]) {
    $all_attachments = $attachments;
    $attachments = array();
    foreach ($all_attachments as $attachment)
    if (strtotime($attachment->post_date) > strtotime(‘7 days ago’)) $attachments[] = $attachment;

  • The topic ‘[Plugin: WP] Auto smush times out and bulk is impractical’ is closed to new replies.