[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
Fri May 16 05:25:46 UTC 2025
#63448: Image quality significantly degrades for resized PNGs with transparency in
WordPress 6.8.1
--------------------------+---------------------
Reporter: elvismdev | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8.2
Component: Media | Version: 6.8
Severity: major | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by elvismdev):
Thanks @wildworks for digging deep into this and pinpointing the
regression to the `quantizeImage()` line added in [59589].
From my testing and what others have also reported, this function seems to
reduce image quality drastically, particularly for:
* PNGs with transparency or soft gradients
* Images with smooth color transitions, like illustrations or UI graphics
From my research this seems to be because `quantizeImage()` limits the
color palette used in the resized image. While useful for reducing file
size, it's too aggressive by default in these cases, leading to color
banding and a loss of visual fidelity.
I'm adding a patch via this [https://github.com/WordPress/wordpress-
develop/pull/8810 GitHub PR #8810] that skips quantization unless
`$max_colors < 256`, which is common when intentional palette reduction is
desired.
Would love feedback from others affected by this, and happy to iterate
further if needed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63448#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list