[wp-trac] [WordPress Trac] #63448: Image quality significantly degrades for resized PNGs with transparency in WordPress 6.8.1

WordPress Trac noreply at wordpress.org
Tue Jun 10 13:23:20 UTC 2025


#63448: Image quality significantly degrades for resized PNGs with transparency in
WordPress 6.8.1
-------------------------------------------------+-------------------------
 Reporter:  elvismdev                            |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.8.2
Component:  Media                                |     Version:  6.8
 Severity:  critical                             |  Resolution:
 Keywords:  has-patch has-test-info has-unit-    |     Focuses:
  tests needs-dev-note dev-feedback              |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:
     has-patch has-test-info has-unit-tests changes-requested needs-dev-
     note
     => has-patch has-test-info has-unit-tests needs-dev-note dev-feedback


Comment:

 @adamsilverstein

 I think that finally we have got to a point that
 [https://github.com/WordPress/wordpress-develop/pull/8933 the last patch]
 is deliverable, sorting all the extra scenarios we encountered in the past
 weeks.

 It also includes unit tests.

 I'm not sure if dev notes will be required for this

 Just a recap of what has been going on up to now.

 1. Resizing indexed images significantly increases their size, this was
 the first problem you solved with quantization
 2. Quantizing non-indexed images significantly reduces their quality
 (specially in terms of colour gradients)
 3. Force-indexing (`png8`) is a form of aggressive quantization with extra
 stunts like dithering and alpha channel removal.
 4. Force-Indexing Images, limit alpha to 1-bit, therefore images with more
 alpha channel, lose transparency gradients, for this reason, we should not
 force-indexing both greyscale and coloured images with more than 1-bit
 alpha channel.
 5. Indexed Greyscale images need to be both quantized and indexed to
 preserve their moderate size.
 6. We cannot identify indexed Grayscale (standard grayscale, 1-bit alpha)
 images after resizing because we have not found a way to identify them
 without quantizing first (this is the main reason of the `dev-note` as I
 feel we are not solving this in an ideal way).

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


More information about the wp-trac mailing list