Uncaught ReferenceError: browserPrefixes is not defined
-
When having the “optimize js” checked, I can’t see any images on a certain page. I get an error in devtools:
Uncaught ReferenceError: browserPrefixes is not defined at autoptimize_a4f0450fc0550b771025bd52a8a1d9ec.js:14 at autoptimize_a4f0450fc0550b771025bd52a8a1d9ec.js:14 at autoptimize_a4f0450fc0550b771025bd52a8a1d9ec.js:14
When looking at the html, the page goes from this (not js optimized):
<img width="230" height="450" alt="alt" title="title" src="https://website.com/wp-content/uploads/image-name.png" data-orig-src="https://website.com/wp-content/uploads/image-name.png" class="img-responsive wp-image-20727 lazyautosizes lazyloaded" srcset="https://website.com/wp-content/uploads/image-name.png 200w, https://website.com/wp-content/uploads/image-name.png 230w" data-srcset="https://website.com/wp-content/uploads/image-name.png 200w, https://website.com/wp-content/uploads/image-name.png 230w" data-sizes="auto" data-orig-sizes="(max-width: 700px) 100vw, 230px" sizes="230px">
To this (js optimized):
<img width="230" height="450" alt="alt" title="title" src="https://website.com/wp-content/uploads/image-name.png" data-orig-src="https://website.com/wp-content/uploads/image-name.png" class="lazyload img-responsive wp-image-20727" srcset="data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27230%27%20height%3D%27450%27%20viewBox%3D%270%200%20230%20450%27%3E%3Crect%20width%3D%27230%27%20height%3D%27450%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E" data-srcset="https://website.com/wp-content/uploads/image-name.png 200w, https://website.com/wp-content/uploads/image-name.png 230w" data-sizes="auto" data-orig-sizes="(max-width: 700px) 100vw, 230px">
When I un-check the “optimize js” checkbox, all is well again and the images are visible.
WP, theme, plugins – all updated.
Thanks for any insights.
- The topic ‘Uncaught ReferenceError: browserPrefixes is not defined’ is closed to new replies.