Title: Solved: warnings about wp_enqueue
Last modified: July 27, 2018

---

# Solved: warnings about wp_enqueue

 *  Resolved [steveperrie](https://wordpress.org/support/users/steveperrie/)
 * (@steveperrie)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/solved-warnings-about-wp_enqueue/)
 * this plugin works out of the box but has two issues. it generates several warnings
   and it forces you to enter a width and height even if you’re not uploading images.
 * **Solution to the warnings:**
 * wrap the top css/js lines in a function, then reference the function in an add_action
   like this.
 *     ```
       function my_scripts(){
       	$style = 'emwi-css';
       	$css_file = plugins_url( '/external-media-without-import.css', __FILE__ );
       	wp_register_style( $style, $css_file );
       	wp_enqueue_style( $style );
   
       	$script = 'emwi-js';
       	$js_file = plugins_url( '/external-media-without-import.js', __FILE__ );
       	wp_register_script( $script, $js_file, array( 'jquery' ) );
       	wp_enqueue_script( $script );
       }
   
       add_action('wp_enqueue_scripts', 'my_scripts');
       ```
   
 * Solution to the image requirement:
 * comment out the //return $input; line around line 210.

Viewing 1 replies (of 1 total)

 *  Plugin Author [zzxiang](https://wordpress.org/support/users/zzxiang/)
 * (@zzxiang)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/solved-warnings-about-wp_enqueue/#post-10669075)
 * Thanks for the solution. The debug warnings are fixed in version 1.1.1.

Viewing 1 replies (of 1 total)

The topic ‘Solved: warnings about wp_enqueue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-media-without-import_c29ee4.
   svg)
 * [External Media without Import](https://wordpress.org/plugins/external-media-without-import/)
 * [Support Threads](https://wordpress.org/support/plugin/external-media-without-import/)
 * [Active Topics](https://wordpress.org/support/plugin/external-media-without-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-media-without-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-media-without-import/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [zzxiang](https://wordpress.org/support/users/zzxiang/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/solved-warnings-about-wp_enqueue/#post-10669075)
 * Status: resolved