[wp-trac] [WordPress Trac] #57238: Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless + Smaller in size than original
WordPress Trac
noreply at wordpress.org
Thu Dec 1 00:08:03 UTC 2022
#57238: Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless
+ Smaller in size than original
--------------------------+-----------------------------
Reporter: abitofmind | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.1.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
On WordPress 6.1.1 I uploaded different WebPs (lossless/lossy +
with/without alpha channel) and the Responsive Images that WordPress
creates from them should fulfill these criteria
1. ✅ Preserve the alpha channel → To maintain layout/design capabilities
2. ✅ Lossless original should result in lossless sized versions → To
preserve full quality (e.g. screen designs, diagrams, etc)
3. ✅ File size of smaller sized versions should never be larger than the
original → Else the purpose of Responsive Images to conserve bandwidth is
moot.
To my shock in one case ALL 3 criteria were violated, in other cases some
criteria were violated.
== Input: WebP, lossless, with alpha channel
**Original**: Axure-Prototyping-2-dynamic-title-scaled.webp • 2880 × 1750
• 21.77 KB • 1:926 (compression factor)
1. ❌ Without alpha channel → Looses me layout/design capabilities.
- Found no ticket "Responsive Images of WebP should preserve alpha
channel" - Should we file this?
2. ❌ Lossy versions from lossless original → Looses me quality against my
intention.
- Possibly related to one of those:
- #53663 another example for a failed feature detection?
- #53669 maybe related?
3. ❌ Larger in file size, even if smaller in dimensions → Contrary to the
intended goal of Responsive Images.
- Axure-Prototyping-2-dynamic-title-scaled.webp • 2560 × 1556 • 29.67 KB
• 1:536
- Axure-Prototyping-2-dynamic-title-2048x1244.webp • 2048 × 1244 • 23.89
KB • 1:426
- Axure-Prototyping-2-dynamic-title-1536x933.webp • 1536 × 933 • 16.20
KB • 1:353
- Is the first one to be smaller in file size than the original
- Issue #53653 fixed larger file sizes by avoiding lossless versions
from lossy original.
- But here we have the reverse, but nevertheless an increase in file
size! Also need to avoid that.
== Input: WebP, lossless, without alpha channel
Original: Confluence-Absence-Inspector-in-Create-Mode.webp • 2880 × 1620 •
672.73 KB • 1:27
1. N/A No alpha channel present in the original. So no alpha channel can
be lost either.
2. ❌ Lossy versions from lossless original → Undesired!
3. ✅ File size of smaller sized versions are all smaller than the
original:
- Confluence-Absence-Inspector-in-Create-Mode-scaled.webp • 2560 × 1440
• 136.88 KB • 1:107
- Already the first smaller version is already smaller in file size
- Thanks to compression ofc. Note: When the version would remain
lossless (see point 2) I still would have that expectation ofc.
== Further notes
- The WebP files were created from PNGs with GraphicConverter 11.7.1 (beta
build 5672) with these metadata options:
- Without any color profile information (the raw pixel values are sRGB
compliant, so the default fallback sRGB applies)
- With a [https://www.lemkesoft.info/forum/viewtopic.php?p=27608#p27608
minimal Exif chunk which only stores resolution info] (I tag my Retina
images as 144 PPI, something which I would like WordPress to detect as a
@2x Retina image, but that's another issue)
- Btw I was concerned that that Exif chunk is at the end of the file
(at the end of the linked post), but the developer of GraphicConverter
said, [https://www.lemkesoft.info/forum/viewtopic.php?p=27646#p27646 I
just use the public code from Google to create the WebP and can't
influence the order, that's how the WebP comes out.]
- Wanted to mention it here for completeness, maybe relevant.
- With webpinfo I confirmed the existence of alpha channel and
lossless/lossy status of WebP for all mentioned files (originals +
responsive image versions by WordPress) .
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57238>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list