Title: JS Error if script_debug is defined
Last modified: September 25, 2017

---

# JS Error if script_debug is defined

 *  Resolved [virgodesign](https://wordpress.org/support/users/virgodesign/)
 * (@virgodesign)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/)
 * There is a js error that shows up in the browser developer console when the `
   SCRIPT_DEBUG` constant is defined and set to `true`.
 * The error is the following
    `ReferenceError: instant_img_localize is not defined`,
   on `instant-images.js`
 * This js error appears in many admin pages.
    The instant images page stop working.
    -  This topic was modified 8 years, 8 months ago by [virgodesign](https://wordpress.org/support/users/virgodesign/).

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

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9528985)
 * Hi [@virgodesign](https://wordpress.org/support/users/virgodesign/),
    Nice find,
   confirmed this issue so thanks for sharing. Honestly, I have no idea how to fix
   this. Any ideas?
 *  Thread Starter [virgodesign](https://wordpress.org/support/users/virgodesign/)
 * (@virgodesign)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9529221)
 * Hi [@dcooney](https://wordpress.org/support/users/dcooney/),
 * yes, try changing the handle of the `wp_localize_script` function from `instante-
   images` to `instant-images-react`.
 * The javascript file `instant-images.js` is registered with the `instant-images-
   react` handle.
 * For me works fine! 🙂
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9531676)
 * Awesome, thanks!
    I’ll add this for the next release.
 *  Thread Starter [virgodesign](https://wordpress.org/support/users/virgodesign/)
 * (@virgodesign)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9534589)
 * Ok, we can mark this topic as resolved.
 *  [Luis Martins](https://wordpress.org/support/users/lmartins/)
 * (@lmartins)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9823767)
 * Current version is still throwing this error.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9823838)
 * I havent released a new version yet.

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

The topic ‘JS Error if script_debug is defined’ is closed to new replies.

 * ![](https://ps.w.org/instant-images/assets/icon-256x256.png?rev=2504172)
 * [Instant Images - One-click Image Uploads from Unsplash, Openverse, Pixabay, Pexels, and Giphy](https://wordpress.org/plugins/instant-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/instant-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/instant-images/)
 * [Active Topics](https://wordpress.org/support/plugin/instant-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/instant-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/instant-images/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/js-error-if-script_debug-is-defined/#post-9823838)
 * Status: resolved