Title: SyntaxErro with lazyload enabled
Last modified: January 27, 2026

---

# SyntaxErro with lazyload enabled

 *  [Bruno](https://wordpress.org/support/users/heeroyui/)
 * (@heeroyui)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/)
 * When lazy loading is enabled in the latest version of Breeze, this error occurs.
   The problem can disrupt the cache if there is a combination of JS files.
 * breeze__xxxxxxxxxx_-1-19-inline_script_19.js?ver=1769500703:1 Uncaught SyntaxError:
   Unexpected token ‘&’
   window.addEventListener(“DOMContentLoaded”,(e=>{document.
   querySelectorAll(‘img[loading=”lazy”]’).forEach((e=>{e.getBoundingClientRect().
   top<=window.innerHeight&&(e.loading=”eager”)}))}))

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

 *  Plugin Author [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * (@owaisalam)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18799648)
 * Could you please share your current Breeze settings? This would be very helpful
   for us in narrowing down the root cause of the issue.
 *  Thread Starter [Bruno](https://wordpress.org/support/users/heeroyui/)
 * (@heeroyui)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18799664)
 * Basic Options
 * ✔ Cache System
   ✔ Mobile Cache✔ Gzip compression✔ Browser cache✔ Cross origin 
   Safe links
 * File Optimization
 * ✔ HTML minify
   ✔ CSS minify (removes whitespace + font)✔ Include inline CSS✔ Combine
   CSS✔ JS minify✔ Include inline JS✔ Combine JS
 * Preload
 * ✔ Preload Links
 * Advanced options
 * ✔ Disable emoji
   ✔ Host Files Locally (Google Fonts)
 * The rest is not active.
 * If I enable lazy loading of images (images + iframe + video + native browser),
   I have the problem.
   **I just saw that the problem comes from the “Enable lazy
   loading of native browser” option. I never had this problem before with the option
   enabled.**
 *  Plugin Author [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * (@owaisalam)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18799813)
 * Thanks for sharing the details.
 * Could you please navigate to the `breeze/inc/breeze-admin.php` file and locate
   line **292**?
 * Kindly remove the `wp_kses_post()` function from that line and then check if 
   the issue is resolved.
 * Let us know the outcome so we can assist you further if needed.
 *  Thread Starter [Bruno](https://wordpress.org/support/users/heeroyui/)
 * (@heeroyui)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18800794)
 * yes
 * I no longer have the problem when I enable the “Enable lazy loading of native
   browser” option and delete the following line: 
 *     ```wp-block-code
       // For JavaScript code blocks, use wp_kses_post which allows safe contentprintf( '<script type="text/javascript">%s</script>', wp_kses_post( $sanitized_js ) );
       ```
   
 * (but if the code remains, it will return in the next update)
 *  Plugin Author [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * (@owaisalam)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18801301)
 * There’s no need to remove the entire link.
   Please remove only the `wp_kses_post()`
   function and check if the issue is resolved.
 * `printf( '<script type="text/javascript">%s</script>', $sanitized_js );`

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsyntaxerro-with-lazyload-enabled%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/breeze/assets/icon-256x256.gif?rev=3352595)
 * [Breeze Cache](https://wordpress.org/plugins/breeze/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/breeze/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/breeze/)
 * [Active Topics](https://wordpress.org/support/plugin/breeze/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breeze/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breeze/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/syntaxerro-with-lazyload-enabled/#post-18801301)
 * Status: not resolved