Title: gbrooks's Replies | WordPress.org

---

# gbrooks

  [  ](https://wordpress.org/support/users/gbrooks/)

 *   [Profile](https://wordpress.org/support/users/gbrooks/)
 *   [Topics Started](https://wordpress.org/support/users/gbrooks/topics/)
 *   [Replies Created](https://wordpress.org/support/users/gbrooks/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/gbrooks/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/gbrooks/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/gbrooks/engagements/)
 *   [Favorites](https://wordpress.org/support/users/gbrooks/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Smush – Image Optimization, Compression, Lazy Load, WebP & CDN] [Plugin: WP Smush.it] Http error with WordPress 3.1](https://wordpress.org/support/topic/plugin-wp-smushit-http-error-with-wordpress-31/)
 *  [gbrooks](https://wordpress.org/support/users/gbrooks/)
 * (@gbrooks)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-smushit-http-error-with-wordpress-31/#post-1944444)
 * I have been doing some digging into this problem.
 * To make a long story short, I got it sort of working in 3.1 by commenting out“
   add_filter(‘wp_generate_attachment_metadata’, ‘wp_smushit_resize_from_meta_data’);”
   at about line 41. It won’t smush.it automatic upon upload, but will allow to 
   manual Smush.it.
 * From what I can tell by tracing the code, is that every time attachment metadata
   is accessed, it fires the filter/function on about line 41. So when you open 
   up the media library and it accesses the metadata for each attachment in the 
   library, it tries to smush.it each images. On my server it usually results in
   a timeout or HTTP 500 error.
 * Also, something may have changed that effects “wp_update_attachment_metadata(
   $attachment_ID,$new_meta);” on about line 96. I can see the images being sent
   to smush.it and the new metadata array but the attachment metadata isn’t being
   updated in the database. I even tried “update_post_meta($attachment_ID, ‘_wp_attachment_metadata’,
   $new_meta, $original_meta);”
 * This is about as far as I got. Hope this helps.

Viewing 1 replies (of 1 total)