WP Smush
Auto smush times out and bulk is impractical (1 post)

  1. Brian Zeligson
    Posted 3 years ago #

    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;


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Smush
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Brian Zeligson
  • This topic is not resolved
  • WordPress version: 3.3.1