WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 months ago

#28750 new enhancement

Media modal: preview images

Reported by: iseulde Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch
Focuses: administration Cc:
PR Number:

Description

I'm not sure if this has been talked about before, but with FileReader we could preview images in the media modal.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader

I've made a quick patch to try it, but it's far from perfect... It sometimes flickers and the reading seems to block js from executing further, so not ideal for uploading a ton of images at the same time. Still, I'm sure we can get this to work smoothly somehow.

I'll attach a screenshot. I think this would be a really cool experience. :)

Attachments (2)

Screen Shot 2014-07-04 at 13.44.06.png (336.6 KB) - added by iseulde 5 years ago.
28750.patch (2.7 KB) - added by iseulde 5 years ago.

Download all attachments as: .zip

Change History (4)

@iseulde
5 years ago

#1 @helen
5 years ago

So cool.

#2 @chriscct7
4 years ago

  • Focuses administration added
  • Keywords needs-patch added

FileReader still has limited support http://caniuse.com/#feat=fileapi. However there's an MIT licensed plugin that could be used to bridge that gap https://github.com/MrSwitch/dropfile with a downside that it requires SilverLight

Note: See TracTickets for help on using tickets.