[wp-trac] [WordPress Trac] #53667: Support `wp_editor_set_quality` for both loaded and saved `mime_type`s

WordPress Trac noreply at wordpress.org
Thu Jul 15 15:14:50 UTC 2021


#53667: Support `wp_editor_set_quality` for both loaded and saved `mime_type`s
--------------------------+---------------------
 Reporter:  mikeschroder  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.8
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by mikeschroder):

 We talked about this
 [https://wordpress.slack.com/archives/C02SX62S6/p1626358048113500 in a
 media meeting today].

 There are more details there, but to leave what I've tried so far:

 One possible solution for this would be to run `set_quality()` during the
 save process if the output `mime_type` is different, then again (to set it
 to the previous type's values) after the process is finished — a bit the
 way that Imagick currently does with image formats.

 This should also be doable with GD.

 I haven’t, as of yet, been able to get this exactly right / to an elegant
 solution, and I think it'd be a big change in `set_quality()` behavior so
 close to release.

 Ideally, this would have a good set of tests to make sure quality per mime
 type applies in both Imagick and GD properly during saving, and in the
 priority (#53669) expected.

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


More information about the wp-trac mailing list