[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 Jan 19 15:15:37 UTC 2023
#57238: Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless
+ Smaller in size than original
-----------------------------+-----------------------------
Reporter: abitofmind | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------------
Comment (by abitofmind):
Again an example where the smaller sized lossy version is larger in file
size than original WebP lossless with alpha:
|| 836 × 426 || original || lossless || 24.598 bytes ||
|| 768 x 391 || thumbnail || lossy || **35.324 bytes (!)** ||
|| 300 × 153 || thumbnail || lossy || 9.056 bytes ||
|| 150 × 76 || thumbnail || lossy || 3.346 bytes ||
I compared them with Exiftool:
- They are all: 24 Bit Color, 8 Bit Alpha
- But although the sized versions use compression, their **alpha channel
is saved uncompressed**!
- I cannot explain why this is larger than the original which supposedly
has both composite and alpha channel uncompressed, but I do not know the
details of the WebP format.
But hopefully this gives you an idea what is going on and how to improve
it.
- Attached is a screenshot of the image file comparison + ZIP archive
containing original and 3 sized versions
- Below you find the relevant ExifTool output (irrelevant stuff like file
permissions, dates, etc removed)
{{{
ExifTool Version Number : 12.50
======== Style-Guide.webp
File Name : Style-Guide.webp
File Size : 25 kB
File Type : Extended WEBP
File Type Extension : webp
MIME Type : image/webp
WebP Flags : Alpha
Image Width : 836
Image Height : 426
Image Size : 836x426
Megapixels : 0.356
======== Style-Guide-768x391.webp
File Name : Style-Guide-768x391.webp
File Size : 35 kB
File Type : Extended WEBP
File Type Extension : webp
MIME Type : image/webp
WebP Flags : Alpha
Image Width : 768
Image Height : 391
Alpha Preprocessing : Level Reduction
Alpha Filtering : Horizontal
Alpha Compression : Lossless
VP8 Version : 0 (bicubic reconstruction, normal loop)
Horizontal Scale : 0
Vertical Scale : 0
Image Size : 768x391
Megapixels : 0.300
======== Style-Guide-300x153.webp
File Name : Style-Guide-300x153.webp
File Size : 9.1 kB
File Type : Extended WEBP
File Type Extension : webp
MIME Type : image/webp
WebP Flags : Alpha
Image Width : 300
Image Height : 153
Alpha Preprocessing : Level Reduction
Alpha Filtering : Horizontal
Alpha Compression : Lossless
VP8 Version : 0 (bicubic reconstruction, normal loop)
Horizontal Scale : 0
Vertical Scale : 0
Image Size : 300x153
Megapixels : 0.046
======== Style-Guide-150x76.webp
File Name : Style-Guide-150x76.webp
File Size : 3.3 kB
File Type : Extended WEBP
File Type Extension : webp
MIME Type : image/webp
WebP Flags : Alpha
Image Width : 150
Image Height : 76
Alpha Preprocessing : Level Reduction
Alpha Filtering : Horizontal
Alpha Compression : Lossless
VP8 Version : 0 (bicubic reconstruction, normal loop)
Horizontal Scale : 0
Vertical Scale : 0
Image Size : 150x76
Megapixels : 0.011
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57238#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list