[wp-trac] [WordPress Trac] #39883: Code hooking on `image_downsize` can no longer assume the file is an image

WordPress Trac noreply at wordpress.org
Mon May 22 23:12:37 UTC 2017


#39883: Code hooking on `image_downsize` can no longer assume the file is an image
-----------------------------------+------------------------
 Reporter:  stephdau               |       Owner:  joemcgill
     Type:  defect (bug)           |      Status:  assigned
 Priority:  normal                 |   Milestone:  4.8
Component:  Media                  |     Version:  4.7
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------

Comment (by mikeschroder):

 Replying to [comment:25 stephdau]:
 > In [attachment:39883.2.diff], we should make `$supported_types = array(
 'image', 'pdf' );` filterable. In our install, we currently do not support
 PDF thumbnails, for example, and that would let us short-circuit the
 function when facing a PDF. It would also let integrators add their own
 supported types, should they need to.

 This was the only thing that stood out to me when reviewing as well.

 I like the idea of having a filterable list of types that are supported
 for thumbnail creation -- in particular because I can see a future where
 we might want to add additional types to this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39883#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list