[wp-trac] [WordPress Trac] #48736: Exclude PNG images from scaling after upload

WordPress Trac noreply at wordpress.org
Thu Nov 28 19:34:33 UTC 2019


#48736: Exclude PNG images from scaling after upload
-----------------------------------+---------------------
 Reporter:  azaozz                 |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  5.3.1
Component:  Upload                 |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+---------------------

Comment (by rmens):

 Replying to [comment:5 azaozz]:

 > Could you provide some more info about this, if possible? In particular,
 was that increase seen only when post-processing uploaded images or was it
 an overall increase after updating to WP 5.3?

 Had time to check this today. We have a separate cluster for the wp-admin
 and the CPU load increase is only noticeable there. On the front-end
 cluster the CPU load did not increase. This seems to be directly related
 to post-processing uploaded images. I wonder about the impact on large
 shared hosting platforms. We mostly use JPG images, not PNG. So this might
 be a 'separate' thing.

 > However it seems that in some cases PHP (GD and ImageMagick) do not
 handle resizing/scaling of very large PNG images well. So this ticket is
 to (temporarily?) turn off replacing the "full" size image with a scaled
 down version, and use the originally uploaded image as before.

 PNG images are quite a beast to deal with. Some of our editors use a tool
 called 'ImageOptim' to reduce the size of PNG images a lot. This is mostly
 the case with images for infographics, quizzes and patterns. I did some
 tests with a bunch of iOS screenshots. The scaled version ended up being
 larger than the original PNG when using ImageOptim.

 So disabling this for PNG seems like the right move. I however don't see a
 path ahead to ever make this work reliably for PNG.

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


More information about the wp-trac mailing list