[wp-trac] [WordPress Trac] #25452: Media modal uses full image size if "medium" is not in the size array
WordPress Trac
noreply at wordpress.org
Mon Sep 30 15:32:39 UTC 2013
#25452: Media modal uses full image size if "medium" is not in the size array
--------------------------+-----------------------------
Reporter: mboynes | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords: needs-patch
--------------------------+-----------------------------
If you filter `"image_size_names_choose"` and "medium" is not one of the
array keys, then the media modal dialog will use full image sizes for its
previews. Since it loads 40 images at a time, if your original images are
all 2mb images, your browser is going to download 80mb (!) of data.
Ultimately the issue is that
[http://core.trac.wordpress.org/browser/tags/3.6.1/wp-includes/js/media-
views.js#L2722 "medium" is hardcoded]. `imageSize()` accepts an argument,
but [http://core.trac.wordpress.org/browser/tags/3.6.1/wp-includes/js
/media-views.js#L2567 one simply isn't passed]. I believe the resolution
to this would be to add a way to set the default image size you'd like to
use here, and for that default to be passed along to `imageSize()`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25452>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list