Opened 20 months ago

Last modified 8 months ago

#18835 new enhancement

Add filter to image_resize_dimensions( ) return values

Reported by: scottconnerly Owned by:
Priority: normal Milestone: Awaiting Review
Component: Media Version: 3.2.1
Severity: minor Keywords: has-patch needs-testing
Cc:

Description

Requesting a filter on the values about to be returned, including access to the function's original arguments.

Use case:
Currently, any cropping happens to images always crops to the top-left corner (0,0). Want to be able to write a plugin that will allow cropping with more options (say, crop out at the middle of the image, etc).

Attachments (1)

media.diff (703 bytes) - added by scottconnerly 20 months ago.
now using copact( ), good call.

Download all attachments as: .zip

Change History (7)

Found #15989 - same use case, he just proposes making it core functionality. Hoping my ticket will be approved as it is less invasive.

If you can provide a patch, I'd be interested. The lack of a filter here is annoying and very much a bug.

  • Keywords has-patch added; needs-patch removed
  • Keywords needs-testing added

It'd be worth using compact() for the 3rd parameter to make it more readable.

now using copact( ), good call.

Is this something that can be addressed for in 3.5? Seems like it fits the focus

Note: See TracTickets for help on using tickets.