Title: Uncaught TypeError: Cannot read property
Last modified: January 15, 2018

---

# Uncaught TypeError: Cannot read property

 *  [pferdetermine](https://wordpress.org/support/users/pferdetermine/)
 * (@pferdetermine)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/)
 * I installed autoptimize yesterday. Now I recognized the following errors on some
   pages – the effect is that the images are not shown:
 * autoptimize_2a4216637bbaee21450122257e5971a9.js:9 Uncaught TypeError: Cannot 
   read property ‘html5’ of undefined
    at autoptimize_2a4216637bbaee21450122257e5971a9.
   js:9 at autoptimize_2a4216637bbaee21450122257e5971a9.js:9 at autoptimize_2a4216637bbaee21450122257e5971a9.
   js:9 (anonymous) @ autoptimize_2a4216637bbaee21450122257e5971a9.js:9 (anonymous)
   @ autoptimize_2a4216637bbaee21450122257e5971a9.js:9 (anonymous) @ autoptimize_2a4216637bbaee21450122257e5971a9.
   js:9 autoptimize_2a4216637bbaee21450122257e5971a9.js:8 Uncaught ReferenceError:
   starAction is not defined at HTMLDocument.<anonymous> (autoptimize_2a4216637bbaee21450122257e5971a9.
   js:8) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.
   js?ver=1.12.4:2) at Function.ready (jquery.js?ver=1.12.4:2) at HTMLDocument.K(
   jquery.js?ver=1.12.4:2) (anonymous) @ autoptimize_2a4216637bbaee21450122257e5971a9.
   js:8 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 ready @ jquery.
   js?ver=1.12.4:2 K @ jquery.js?ver=1.12.4:2
 * If I add the code to not use autoptimize the error goes away and the images are
   displayed. What do I have to exclude from the JS-optimization?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-typeerror-cannot-read-property%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [pferdetermine](https://wordpress.org/support/users/pferdetermine/)
 * (@pferdetermine)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/#post-9865205)
 * PS: currently I have added the following to be excluded: seal.js, js/jquery/jquery.
   js,wp-spamshield,jquery.js,jquery-migrate.min.js
    But I am not sure if I need
   all of them or only some and what is missing. Please help! Thanks in advance,
 * Kathrin
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/#post-9865560)
 * afternoon Kathrin;
    [http://pferdetermine.de/veranstaltungen-fuer-pferd-und-reiter/neueste-veranstaltungen/](http://pferdetermine.de/veranstaltungen-fuer-pferd-und-reiter/neueste-veranstaltungen/)
   seems to work just fine to me, can you point me to a page where this problem 
   occurs?
 * frank
 *  Thread Starter [pferdetermine](https://wordpress.org/support/users/pferdetermine/)
 * (@pferdetermine)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/#post-9866963)
 * I just did some trail and error and had added the following now:
    excluded js:
   seal.js, js/jquery/jquery.js,wp-spamshield,jquery.js,jquery-migrate.min.js,events-
   manager,customizr/assets/js,customizr/inc/assets/js
 * excludeed css: admin-bar.min.css, dashicons.min.css,czr-control.min.css,tc-common.
   min.css, green2.min.css
 * At the moment I have also deactivated the browser caching in the .htaccess beacuse
   I wasn’t sure where the missing images came from…
 * I probably disable too much now and the performance is not really good now. Can
   you give some advice how to identify which js and css to exclude and what the
   syntax for the path is??? Do you have any experiences or live sites using your
   plugin and events-manager?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/#post-9868431)
 * > I probably disable too much now and the performance is not really good now.
   > Can you give some advice how to identify which js and css to exclude
 * well, best way forward would be to remove your exclusions one by one and test.
   if things break, re-add what you just removed. if things work you’ve found a 
   JS (or CSS) that does not need to be excluded 🙂
 * > Do you have any experiences or live sites using your plugin and events-manager?
 * Haven’t worked with it myself, but I _think_ I have seen it mentioned already
   here on the support forum.

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

The topic ‘Uncaught TypeError: Cannot read property’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/uncaught-typeerror-cannot-read-property/#post-9868431)
 * Status: not resolved