[wp-trac] [WordPress Trac] #36477: Responsive images (srcset) can include images larger than the full size
WordPress Trac
noreply at wordpress.org
Thu May 9 23:15:48 UTC 2024
#36477: Responsive images (srcset) can include images larger than the full size
-------------------------------------------------+-------------------------
Reporter: peterdavehello | Owner: pbearne
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Media | Version: 4.4.2
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev- | Focuses:
feedback has-unit-tests | performance
-------------------------------------------------+-------------------------
Comment (by nosilver4u):
I've been working on a fix for this in EWWW Image Optimizer, and pretty
sure it has not been fixed. I have multiple paletted PNG images that have
thumbs much larger than the original. I would note, checking that an image
is 8-bit is not sufficient, one needs to make sure it is also paletted
(PNG color type 3).
I am definitely curious if your fix works though, as I've tried a couple
other pure-PHP fixes: quantizing and/or prefixing the filename with
'PNG8:'. The former introduces some ugly "noise" around transparent
boundaries, and the latter just flat-out failed for me on both IM 6.9 and
7.1.
Because EWWW IO has pngquant available (or an image-processing API), I
ended up using pngquant to reduce the palette accordingly, and that worked
very nicely.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36477#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list