Title: Interference with Autoptimize minification
Last modified: May 6, 2019

---

# Interference with Autoptimize minification

 *  Resolved [Fox Lee](https://wordpress.org/support/users/fox-lee/)
 * (@fox-lee)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/)
 * Hi there,
 * I’m running W3TC and Autoptimize together, as I love your caching features but
   AO is a bit better for me when it comes to minification. Lately I’ve run into
   an issue where W3TC is preventing some features of AO from working correctly.
   Specifically, it seems to be due to classes used for HTML minification ([details in this thread](https://wordpress.org/support/topic/lazy-load-not-catching-all-images/)).
 * I’m raising it with you because this comes up even when I have minification completely
   turned off in W3TC, which seemed a bit weird. Is this working as intended? If
   so, could it be changed to prevent this kind of conflict when W3TC isn’t being
   used for minification?
 * Thanks for your time!

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11503611)
 * Hello,
 * Please update the plugin to the latest 0.9.7.4 version.
    If the issue persists,
   try adding the following In wp-content/plugins/w3-total-cache/lib/Minify/Minify/
   HTML.php replacing lines 346 and 347 with `$m[2] = preg_replace( '/([a-z0-9]=)\'([
   ^"\'\\s=]+[^"\'\\s=\\/])\'(\\s(?!\\/)|>)/i', '$1$2$3', $m[2] );`
 *  `$m[2] = preg_replace( '/([a-z0-9]=)"([^"\'\\s=]+[^"\'\\s=\\/])"(\\s(?!\\/)|
   >)/i', '$1$2$3', $m[2] );`
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11503652)
 * Hey Marko;
    Frank from Autoptimize here. The root cause seems that W3TC is loading
   its HTML minify class (and probably others) even if HTML minify is not active,
   could that be changed? That way there is no risk of interference of W3TC’s classes
   with AO (as in that case the AO classes will be autoloaded)?
 * frank
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11504330)
 * Hello Frank,
 * I spoke with the team, and we’ve added an issue to auto-load minify library only
   when minify is on.
    This should be fixed in a future release.
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11504338)
 * That’s great news Marko, thanks for looking into this! 👍
 *  Thread Starter [Fox Lee](https://wordpress.org/support/users/fox-lee/)
 * (@fox-lee)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11523543)
 * Sorry for the late response, thank you to both of you for your help with this
   🙂

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

The topic ‘Interference with Autoptimize minification’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [conflict](https://wordpress.org/support/topic-tag/conflict/)
 * [minification](https://wordpress.org/support/topic-tag/minification/)

 * 5 replies
 * 3 participants
 * Last reply from: [Fox Lee](https://wordpress.org/support/users/fox-lee/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/interference-with-autoptimize-minification/#post-11523543)
 * Status: resolved