Title: Header images stop working when Javascript is enabled
Last modified: May 16, 2017

---

# Header images stop working when Javascript is enabled

 *  [scottycarney88](https://wordpress.org/support/users/scottycarney88/)
 * (@scottycarney88)
 * [9 years ago](https://wordpress.org/support/topic/header-images-stop-working-when-javascript-is-enabled/)
 * Hi all I activated the plugin and my site was really quick however all the images
   in my header area on every page stopped working. Everything else was fine just
   the header images.
 * Can anyone help me out? I am using uncode theme if that helps. Once I turn the
   javascript part off it works again.
 * Thanks.

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years ago](https://wordpress.org/support/topic/header-images-stop-working-when-javascript-is-enabled/#post-9138468)
 * evening [@scottycarney88](https://wordpress.org/support/users/scottycarney88/);
   
   great you were able to pinpoint JS as culprit!
 * next step is trying to identify which JS script is making those images appear
   and excluding that from the JS optimization. JS errors on the browser console
   might even tell us something as well.
 * [the FAQ](https://wordpress.org/plugins/autoptimize/faq) discusses these troubleshooting
   steps in more detail.
 * don’t hesitate to follow up on this here! 🙂
 * frank
 *  Thread Starter [scottycarney88](https://wordpress.org/support/users/scottycarney88/)
 * (@scottycarney88)
 * [9 years ago](https://wordpress.org/support/topic/header-images-stop-working-when-javascript-is-enabled/#post-9138479)
 * Hi Frank thanks for your quick response.
 * My coding knowledge is very limited so bare with me. How do I find the JS script
   that controls the header images?
 * Thanks.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years ago](https://wordpress.org/support/topic/header-images-stop-working-when-javascript-is-enabled/#post-9139369)
 * well, you can check your HTML source on an un-optimized page (simply add `?ao_noptimize
   =1` to the URL) to look for a JS-file of which the name indicates it does lazy
   loading?
 * an alternative approach could be to add `themes/` to the JS optimization exclusion
   list. if that fixes the problem, you have to only look at the JS-files of your
   theme, if it doesn’t you can try the same approach with `plugins/`.
 * and your browser console might have JS errors, feel free to copy paste those 
   here ..
 * frank

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

The topic ‘Header images stop working when Javascript is enabled’ is closed to new
replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/header-images-stop-working-when-javascript-is-enabled/#post-9139369)
 * Status: not resolved