[wp-trac] [WordPress Trac] #58155: Add filter to allow large image scaling of PNGs

WordPress Trac noreply at wordpress.org
Wed Apr 19 15:48:45 UTC 2023


#58155: Add filter to allow large image scaling of PNGs
--------------------------+------------------------------
 Reporter:  pelstudio     |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Upload        |     Version:  5.3.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+------------------------------

Comment (by pelstudio):

 Replying to [comment:1 costdev]:
 > As this was introduced in 5.3.1, I'll update the `Version` property to
 note when this first became an issue.

 Apologies for that. Still learning the system. We have a couple others
 potential issues to report so will hopefully do a better job.

 > It looks like we could change [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/includes/image.php#L261 this condition]:
 >
 > to:
 > {{{#!php
 > <?php
 > if ( 'image/png' !== $imagesize['mime'] || apply_filters(
 'big_image_scale_png', false, $imagesize, $file, $attachment_id ) ) {
 > }}}

 That would do it from our perspective. Would love to see this!

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


More information about the wp-trac mailing list