• Resolved BjornB

    (@bjornb)


    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.

    • This topic was modified 3 years, 6 months ago by BjornB.
    • This topic was modified 3 years, 6 months ago by BjornB.
    • This topic was modified 3 years, 6 months ago by BjornB.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hey @bjornb ;
    The JS error is causing other JS (including the lazyload one) not to be executed resulting in broken images. The fix is in finding the root cause, but for me to be able to do that I would need your site’s URL, can you provide that?

    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    any news bjorn?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No feedback so I assume this got resolved BjornB? Feel free to follow up if you still encounter issues!

    have a nice day!
    frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught ReferenceError: browserPrefixes is not defined’ is closed to new replies.