Title: Just perfect&#8230;But&#8230;.
Last modified: September 2, 2016

---

# Just perfect…But….

 *  [Johnny52](https://wordpress.org/support/users/johnny52/)
 * (@johnny52)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/just-perfectbut/)
 * Great plugin…
 * However had over 2,500 images and the plugin would just hang without starting….
   **
   This did the trick, taken from here: [http://wordpress.org/support/topic/plugin-ajax-thumbnail-rebuild-error-500-solution?replies=4](http://wordpress.org/support/topic/plugin-ajax-thumbnail-rebuild-error-500-solution?replies=4)
   On line 179 you can find:
 * >     ```
   >     $attachments =& get_children( array(
   >     	'post_type' => 'attachment',
   >     	'post_mime_type' => 'image',
   >     	'numberposts' => -1,
   >     	'post_status' => null,
   >     	'post_parent' => null, // any parent
   >     	'output' => 'object',
   >     ) );
   >     ```
   > 
   > Changing it to:
   >     ```
   >     $attachments = $wpdb->get_results("SELECT id, post_title FROM {$wpdb->posts} WHERE post_type='attachment' AND post_mime_type LIKE 'image%'");
   >     ```
   > 

 The topic ‘Just perfect…But….’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ajax-thumbnail-rebuild.svg)
 * [AJAX Thumbnail Rebuild](https://wordpress.org/plugins/ajax-thumbnail-rebuild/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-thumbnail-rebuild/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-thumbnail-rebuild/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-thumbnail-rebuild/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-thumbnail-rebuild/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-thumbnail-rebuild/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Johnny52](https://wordpress.org/support/users/johnny52/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/just-perfectbut/)