Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#25452 closed defect (bug) (duplicate)

Media modal uses full image size if "medium" is not in the size array

Reported by: mboynes Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch
Focuses: javascript Cc:


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 "medium" is hardcoded. imageSize() accepts an argument, but 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().

Change History (3)

#1 @mikeschroder
4 years ago

  • Focuses javascript added

#2 @wonderboymusic
4 years ago

  • Milestone changed from Awaiting Review to 3.9

#3 @wonderboymusic
4 years ago

  • Milestone 3.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23292.

Note: See TracTickets for help on using tickets.