Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#21407 closed enhancement (wontfix)

Allow filtering of upload resize dimensions

Reported by: DrewAPicture Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: Media Keywords: has-patch
Focuses: Cc:



Plupload ships with a client-side upload resizer that was included with Core in 3.3 but had the action removed because of browser inconsistencies so I implemented it as a plugin at the time. Everything works just fine and dandy with zero problems except that the resize_height and resize_width vars are defaulted to the Large image sizes defined in media settings. It would be nice to be able to filter one or both of the dimensions outside the scope of the 'Large' size (when 'Original' becomes the same size as 'Large', you effectively lose an image size).

Patch attached.

You'll have to re-add this action to test:

add_action( 'post-upload-ui', 'media_upload_max_image_resize' );

Related: #19174, #19770

Attachments (2)

21407.diff (818 bytes) - added by DrewAPicture 6 years ago.
21407-alternative.diff (849 bytes) - added by DrewAPicture 6 years ago.
alternative to extract()

Download all attachments as: .zip

Change History (5)

6 years ago

6 years ago

alternative to extract()

#1 @DrewAPicture
6 years ago

It occurs to me that using extract() in this instance might be irresponsible as we're outside the scope of a function. 21407-alternative.diff uses an array instead.

#2 @DrewAPicture
6 years ago

  • Keywords dev-feedback added

#3 @DrewAPicture
4 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Nobody else has weighed in in 17 months. Plus, the plupload_default_settings filter was added in 3.5, so once we move away from the current media-new workflow, this will be invalid anyway.

Note: See TracTickets for help on using tickets.