Image drag & drop

Atto ::: atto_imagedragdrop
Maintained by Paul Nicholls
Automatically uploads images dropped into Atto from your computer.
Latest release:
253 sites
10 fans
Current versions available: 1

This plugin automatically uploads images dropped into Atto (from your computer) as though you'd stepped through the process of inserting an image, choosing to upload a new file.

Note that this only works in browsers which support dropping files into the page - IE10+, Firefox, Chrome, Safari and Opera.  Other (or older) browsers will typically attempt to open the dropped file instead.

This plugin is for Moodle 2.7 and 2.8 only, as the functionality it provides has been incorporated into Atto's standard "image" plugin from Moodle 2.9 onwards.

This plugin does not add a toolbar button or any other visible UI to Atto - it simply detects images dragged and dropped into Atto, automatically uploading them to Moodle.  It does still need to be in your Atto toolbar configuration in order to work, though in most cases this should happen automatically as part of the installation process.


Paul Nicholls (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Oct 21, 2014, 8:56 PM
    When I drag and drop nothing happens when I use Firefox and Chrome. In Opera opens the image file. What goes wrong?

  • Thu, Oct 23, 2014, 5:58 PM
    is this an atto plugin? as such, would it work for Atto installed in Moodle 2.6?
  • Fri, Mar 20, 2015, 11:09 AM
    Is possible to make it work when you use a Atto HTML editor using the object "admin_setting_confightmleditor"? That would be great!
  • Tue, Mar 24, 2015, 10:23 AM
    Leopoldo, the reason it doesn't work is that admin_setting_confightmleditor doesn't initialise Atto with file picker options ($fpoptions) - so it has nowhere to put the files. That's why Atto editors created using admin_setting_confightmleditor don't allow you to browse repositories to pick an image (only specify a direct URL) and don't have a "manage files" button. Any instance of Atto which has been initialised with file picker options will be supported by the image drag & drop plugin; if you're developing something, you might want to create a subclass of admin_setting_confightmleditor which initialises the file picker options (and performs any necessary handling on the submitted form).
  • Wazza
    Sun, Aug 30, 2015, 1:11 AM
    Where do you install this plugin? I put in in lib/editors/atto/plugins but nothing happened.

    Some documentation would be nice...
  • Wazza
    Sun, Aug 30, 2015, 1:13 AM
    Scratch above comment... installation instructions are at download-page, button 'learn more', scroll down....
  • Wazza
    Sun, Aug 30, 2015, 1:15 AM
    Unscratch above comment - still doesn't work smile
  • Mon, Sep 7, 2015, 11:11 AM
    I think you have to add the plugin name ( imagedragdrop ) to the list of icons in to the editor toolbar.
    site admin->plugins->text editors->atto html editor->atto toolbar settings.
    Even though it doesn't show anything in the toolbar that enables the plugin.
  • Sun, Sep 27, 2015, 1:33 AM
    moodle 2.9 doesn't work
  • Mon, Sep 28, 2015, 6:27 AM
    Richard, did you finish the installation by visiting the admin notifications page (and following through the upgrade process)? If so, it should have automatically added itself to your Atto toolbar config (assuming that you have the standard "image" plugin enabled), but as Justin suggested, it's worth checking (and adding it if it's not there). As it doesn't add a toolbar button, the easiest way to check if it's working is to drag and drop an image into an Atto editor and then toggle the HTML source view on the editor - if you see an image tag with a "draftfile.php" URL, it's working; if you see one with a "data:image/" URI instead, something's gone wrong. If your image takes a while to upload, you may also notice that a "loading spinner" appears while it's uploading; that's another sign that this plugin is working as expected.

    Çağlar MERSİNLİ, this plugin is only for Moodle 2.7 and 2.8, because the functionality is included in Moodle 2.9 and above. I would suggest that you uninstall and remove this plugin from your Moodle 2.9 site, in order to ensure that it does not clash with the built-in drag-and-drop support for images in Atto on Moodle 2.9.
  • Mon, Sep 28, 2015, 6:43 AM
    I've just updated the plugin description to try to clarify a couple of these points - hopefully that helps reduce confusion.
  • Thu, Oct 1, 2015, 3:00 AM
    Hi Paul Nicholls thank you for reply;
    Yes you right functionality is included in Moodle 2.9 but i cant see class ="img-responsive" property for img tag when i add image with drag and drop on moodle 2.9 how can i get add class ="img-responsive" property with drag and drop on moodle 2.9
  • Tue, Oct 20, 2015, 10:07 AM
    Hi Paul Nicholls,
    I had uninstalled the module " Image drag & drop" in moodle 2.9.2, and found that "Image drag & drop" can work in firfox but chrome fails .
    Could you give any suggestion ? Thank you very much
  • Tue, Oct 20, 2015, 10:31 AM
    The image drag and drop works fine for me in both Chrome and Firefox on 2.9.2+ without this plugin installed (as the functionality was included in the standard Atto "image" plugin from 2.9 onwards). Please make sure that you are giving the page long enough to finish loading and initialising everything before dragging the image in. If it still does not work, please either file a bug report in the Moodle Tracker (if there isn't already one for your issue) and/or start a thread in the community forums, providing as much detail as you can about the problem (steps to reproduce, what happens, etc).
  • Tue, Oct 20, 2015, 8:30 PM
    My problem like chrome question (
    I use chrome brower for moodle 2.9.2+
    I add a new page resource,and use atto html editor.
    If draging a image to atto editor , chrome require to click for inserting a picture.
    The chrome brower ask "do you want to leave this page? " , if click "yes", new page load the image to display.
    if click "no",nothing happens, Atto does not update textarea content on drag&drop event.
    I search Moodle Tracker,

    this problem is fixed.

    I don't know what happened.
1 2
Please login to post comments