WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 18 months ago

#7013 closed feature request (fixed)

Multiple image insert via media uploader

Reported by: duncanmc Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:

Description

There must be an option for inserting multiple images. Sometimes I upload around one hundred of images and want to write comments between them. In order to insert them via panel, I must enter the media manager around one hundered times! Media manager itself is not so fast so it takes a very long time. There must be an option for multiple image insert.

BTW, version 2.7 is too late for adding this option. It must be in 2.6 or maybe in 2.5.2

Attachments (4)

autoclose.diff (1.3 KB) - added by scribu 4 years ago.
almost working
media.php.patch (3.3 KB) - added by ocean90 4 years ago.
the idea
media.php.2.diff (1.4 KB) - added by ocean90 4 years ago.
the idea without bugs
media-bulk-image-uploader.php.zip (3.5 KB) - added by martythornley 21 months ago.

Download all attachments as: .zip

Change History (30)

comment:1 duncanmc6 years ago

  • Milestone changed from 2.7 to 2.6

comment:2 ionfish6 years ago

  • Keywords needs-patch added
  • Priority changed from high to normal
  • Severity changed from major to normal

"It must be" doesn't make things happen, providing patches does.

comment:3 duncanmc5 years ago

  • Milestone changed from 2.9 to 2.8

comment:4 ryan5 years ago

  • Milestone changed from 2.8 to 2.9
  • Resolution set to wontfix
  • Status changed from new to closed
  • Type changed from enhancement to feature request

Unless you can provide a patch for this, this type of functional overhaul will be part of the media features we include in 2.9. 2.8 will be a small release focused on a few specific features wince it only has about 3 weeks development time.

comment:5 jacobsantos5 years ago

  • Milestone 2.9 deleted

comment:6 ocean904 years ago

  • Component changed from Administration to Media
  • Keywords 2nd-opinion added
  • Milestone set to 3.0
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Version 2.5.1 deleted

Maybe we could implement this in 3.0. I think we should give it a try.

We can add a checkbox on the right, if its checked it will close the box. On default its not checked.http://grab.by/2JHq[[BR]]
Maybe we can work with a filter, like #12381.

if ( apply_filters('enable_multiple_images', true) ) {
  $checked = 'checked=""';
else
  $checked = 'checked="checked"';

And then to media_upload_header():

<span class="alignright"><input type="checkbox" <?php $checked;?> /> <label>Auto close</label></span>

comment:7 scribu4 years ago

  • Milestone changed from 3.0 to 3.1

The checkbox idea sounds good, but I think this can wait until 3.1.

It can be added by a plugin, using JavaScript.

scribu4 years ago

almost working

comment:8 scribu4 years ago

I think I spoke too soon.

autoclose.diff adds a checkbox.

The problem is that the iframe contents goes blank and I can't figure out why.

comment:9 scribu4 years ago

  • Milestone changed from 3.1 to 3.0

comment:10 scribu4 years ago

  • Milestone changed from 3.0 to 3.1

I found that the iframe content is refreshed before send_to_editor() is called.

As ryan said, the checkbox would require a functional overhaul.

comment:11 ocean904 years ago

Yes, thats right, its the function media_send_to_editor($html) with an exit.

So I try at the moment to add the checkbox to the form (media.php line 1530) and then add a new parameter to media_send_to_editor:

media_send_to_editor($html, $autoclose) {
  [...]
  if ( $autoclose == true);
   exit;

  return;

I think it not so tricky as you think.

ocean904 years ago

the idea

comment:12 scribu4 years ago

Regarding media.php.patch:

It's the same problem: when you click the "Insert into post" button, a full POST request is made inside the iframe.

To get the HTML for the editor, you would need to make an AJAX request instead - probably using jQuery's serializeArray() function - so that the user's position in the iframe isn't lost.

ocean904 years ago

the idea without bugs

comment:13 nacin4 years ago

Media will likely get a big overhaul in 3.1. I wouldn't spend *too* much time on this until then :)

comment:14 nacin3 years ago

  • Milestone changed from Awaiting Triage to Future Release

comment:15 scribu2 years ago

  • Keywords changed from needs-patch, 2nd-opinion to needs-patch 2nd-opinion

Marked #19622 as duplicate.

comment:16 jane2 years ago

  • Summary changed from Multiple image insert via media manager to Multiple image insert via media uploader

comment:17 azaozz2 years ago

The right way to do this would be to decide on the workflow, UX and UI first and then code it. It seems adding "just-another-checkbox" there won't be the optimal solution.

Some possibilities are:

  • Two insert image buttons at the bottom of each image properties box, "insert (and continue)" and "insert and close".
  • Adding "insert all images" button under the image properties boxes, above the Insert Gallery box.
  • A checkbox next to the Insert Image button (the proposed solution above) that would keep the gallery popup open after inserting the image. IMHO this is the most awkward option, still needs two clicks, etc.

If we go with "insert all images" the user most likely will have to edit each individual image later to add captions, titles, alt, etc.

comment:18 jane2 years ago

@azaozz: Why couldn't the same 'upload, metadata, insert' flow be used, just inserting them individually rather than dropping in a gallery?

comment:19 ocean902 years ago

  • Keywords 3.5-early added; 2nd-opinion removed

I wish this for the next version.

comment:20 sabreuse2 years ago

  • Cc sabreuse@… added

comment:21 martythornley21 months ago

  • Cc marty@… added

I have just added a zip containing a little plugin I wrote a while back. It is based on the Faster Image Insert plugin that is in the repository. We have been using it since the old uploader but it works with the new drag and drop as well.

Being a plugin, it it needs to hook into several places to get it to operate but the working version shows how nice it would be to be able to check off any number of images.

A couple little things to point out...
1) It works with multisite and multisite or not, you can just drop in mu-plugins and it goes.
2) It has a couple little filters that would be nice to add too, allowing other plugins to NOT add images to the editor but to redirect them however you want. My image gallery plugin ties into it and adds images to it's own metabox for example. I'd love to see that work into the media upload process to let plugins be more versatile.

comment:22 ocean9021 months ago

  • Keywords 3.5-early removed
  • Milestone changed from Future Release to 3.5

comment:23 MikeHansenMe18 months ago

  • Cc mdhansen@… added
  • Keywords close added

With the new media uploader you can add multiple image at one time opening each one to comment. Proposing close on this ticket.

comment:24 helenyhou18 months ago

  • Keywords needs-patch close removed

So, close as fixed? And on which revision?

comment:25 MikeHansenMe18 months ago

Perhaps we should not close this until it fully replaces the older uploader. Right now it is accessible via the Beta Media on post/pages. However, the topic of this ticket will no longer be an issue.

comment:26 nacin18 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Going to close this as fixed for 3.5. koopersmith has been using other tickets to track this item's progress, chiefly #21390.

Note: See TracTickets for help on using tickets.