Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 9 years ago

#8268 closed enhancement (wontfix)

Apply image_downsize filter before wp_attachment_is_image check in image_downsize function

Reported by: jbrinley's profile jbrinley Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Gallery Keywords: has-patch
Focuses: Cc:


The function image_downsize in wp-include/media.php calls wp_attachment_is_image, which must return true before applying the image_downsize filter. By moving the call to the image_downsize filter to the beginning of the function, plugins (let's say, for example, the Custom Thumbnails plugin) can return representations of non-image media.

The only possible negative consequence that I can see: plugin writers can't assume that the image_downsize filter will only be called for images (but I don't know that they should assume that, anyway).

Attachments (1)

image_downsize.diff (862 bytes) - added by jbrinley 16 years ago.
Patch for image_downsize in wp-includes/media.php

Download all attachments as: .zip

Change History (7)

16 years ago

Patch for image_downsize in wp-includes/media.php

#1 @Denis-de-Bernardy
15 years ago

  • Keywords dev-feedback added


#2 @janeforshort
15 years ago

  • Milestone changed from 2.8 to 2.9

Punting due to time constraints. Media changes planned for 2.9/3.0.

#3 @Denis-de-Bernardy
15 years ago

a very similar ticket that got closed a week ago or so: #9672

#4 @Denis-de-Bernardy
15 years ago

  • Keywords dev-feedback removed

#5 @janeforshort
15 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Closing due to lack of traction. Can be reopened if anyone wants to passionately advocate for it.

#6 @DrewAPicture
9 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.