[wp-trac] [WordPress Trac] #52867: Add capability to set default format for image sub-sizes.

WordPress Trac noreply at wordpress.org
Wed Apr 21 22:07:29 UTC 2021


#52867: Add capability to set default format for image sub-sizes.
---------------------------------------------------+---------------------
 Reporter:  adamsilverstein                        |       Owner:  (none)
     Type:  enhancement                            |      Status:  new
 Priority:  normal                                 |   Milestone:  5.8
Component:  Media                                  |     Version:
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch has-unit-tests dev-feedback  |     Focuses:
---------------------------------------------------+---------------------

Comment (by spacedmonkey):

 Wondering it is would be cleaner to have a filter like this.

 {{{#!php
 return apply_filters( 'image_editor_output_format', array( $filename,
 $new_ext, $mime_type ) );
 }}}


 Just filter return value of `get_output_format` method. Feels a lot more
 flexible.

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


More information about the wp-trac mailing list