Support » Plugin: Drag & Drop for Post Thumbnails » Can we drag an image in from another website?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, I know that this is outside of the scope of your plugin, but I’m trying to pull out the essential code for the upload form into my own page template for visitors to upload images using drag and drop.

    But I’m getting this error when it wants to call the media_upload_form function.

    Fatal error: Call to undefined function media_upload_form()

    It does not change anything if I include this code

    include_once(ABSPATH . WPINC . '/media.php' );

    at the top of my page template file.

    Can you straighten me out if you have the time or point me in the direction of a premium plugin that does drag and drop uploading and cropping (using plupload and jcrop maybe)? I read here that they are included in wp so it seems a natural to use them. That is what I really want but I don’t have the php and js expertise to make it happen.

    Thanks, Ron

    Plugin Author Tobias Nygren


    Hi Ron!

    I’m not sure this is any help but take a look at media.php in the admin. There you can see how wp is using plupload internally.

    That’s probably a good start. Let me know how it goes!


    Yeah I’m going to have to go back to the basics and roll my own. Once I get the uploaded image in hand I can figure out the jCopy stuff.

    It seems the trickiest part right now is is getting the javascript plupload.full.js to even be available. Is WP supposed to have that already loaded or does every php file have to enqueue it?


    I think I found the answer to my question. The plupload.js and jcrop.js javascript code (and jquery.js since everything is dependendt on it) is included automatically by wordpress in wp-includes/script-loader.php

    And the media_upload_form is not needed by my custom input/upload form. I just need the most basic plupload drag and drop and upload functionality of which there are numerous examples (in bits and pieces) on the web.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can we drag an image in from another website?’ is closed to new replies.