[wp-trac] [WordPress Trac] #54648: Improve filter to enable setting quality for each subsize image

WordPress Trac noreply at wordpress.org
Thu Aug 4 17:47:33 UTC 2022


#54648: Improve filter to enable setting quality for each subsize image
----------------------------------------+------------------------------
 Reporter:  Mte90                       |       Owner:  adamsilverstein
     Type:  enhancement                 |      Status:  accepted
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Media                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  performance
----------------------------------------+------------------------------

Comment (by birgire):

 @adamsilverstein having the possibility to set the quality per size with
 {{{add_image_size()}}}, via an option array, as you mentioned in the
 #56288 ticket, sounds like an interesting approach. At first thought this
 seems like a natural way to be able to config the image setup explicitly.

 I've not drilled deep into this but wonder if that would mean that the
 quality would be set explicitly with the {{{$editor->set_quality( $quality
 )}}} method for each sub-size that defines the quality via
 {{{add_image_size()}}}? or that would still mean modifying the default
 case, where it's not set explicitly as currently done.

 Here are results from the plugin directory for the quality filters:

 jpeg_quality (2129):

 https://wpdirectory.net/search/01G9K09V5X6R46QKCWF0SVDFR6

 wp_editor_set_quality (87):

 https://wpdirectory.net/search/01G9JXGDA1RQXTHP2SF2QMMCXP


 just to have them in the ticket for reference.

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


More information about the wp-trac mailing list