[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
Sat Jun 7 17:45:54 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 dev- | Focuses:
feedback has-unit-tests commit fixed-major |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
Replying to [comment:81 siliconforks]:
> Replying to [comment:79 SirLouen]:
> > 2. We have not found a mechanism to identify alpha in images to
separate them from non-alpha
>
> Did you ever try using the Imagick `getImageChannelDepth()` method?
I've been experimenting with it and it seems to work for me - see
https://github.com/WordPress/wordpress-develop/pull/8933
>
> (Honestly this PR is getting a bit more complicated than I would like,
but it's mostly just rearranging things to work with the original image
before resizing, rather than after.)
Interesting, I think I have not seen this function before.
With this result, things change significantly:
If it's indexed, and it doesn't have what you call "true alpha
transparency", then you can go straight with `png8`
For the rest, Quantization is required to avoid losing the Alpha.
If you can add this modification, I think it's ready to go.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63448#comment:82>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list