Bug 219977 - WebP loading error in Safari on iOS 14.3
Summary: WebP loading error in Safari on iOS 14.3
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 220317 220629 220775 220853 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-16 22:19 PST by Takuya Yamazaki
Modified: 2022-11-22 16:18 PST (History)
10 users (show)

See Also:


Attachments
Reproducible image (812 bytes, image/webp)
2020-12-16 22:19 PST, Takuya Yamazaki
no flags Details
A second bad WebP image (98 bytes, image/webp)
2021-01-26 15:46 PST, Perry
no flags Details
Solid black color (54 bytes, image/webp)
2021-02-26 15:57 PST, Erik Bročko
no flags Details
Solid hex 121212 color (38 bytes, image/webp)
2021-02-26 16:00 PST, Erik Bročko
no flags Details
Example of a webp image that is not working on Safari (242 bytes, image/webp)
2022-03-09 09:53 PST, Bob Singor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Takuya Yamazaki 2020-12-16 22:19:25 PST
Created attachment 416391 [details]
Reproducible image

Some WebP images can no longer be read in iOS 14.3.
There was no problem until iOS 14.2.

We have prepared a page to check the problem.
https://zprodev.github.io/ios14_3_webp_error/index.html

User Agent on my device : Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1
Comment 1 Radar WebKit Bug Importer 2020-12-18 17:06:57 PST
<rdar://problem/72485913>
Comment 2 Alexey Proskuryakov 2021-01-05 08:57:47 PST
*** Bug 220317 has been marked as a duplicate of this bug. ***
Comment 3 Alexey Proskuryakov 2021-01-05 08:59:12 PST
Thank you for the report! Marking as invalid because this was determined to be an issue in system frameworks below WebKit. This will continue to be investigated by Apple internally.
Comment 4 Alexey Proskuryakov 2021-01-15 10:08:13 PST
*** Bug 220629 has been marked as a duplicate of this bug. ***
Comment 5 Yusuke Suzuki 2021-01-20 11:48:58 PST
*** Bug 220775 has been marked as a duplicate of this bug. ***
Comment 6 Eric Portis 2021-01-20 14:40:47 PST
Cloudinary is attempting to work around this issue by turning off WebP support to affected clients.

If this is indeed about the underlying OS frameworks, rather than the browser version, as far as we can tell it appeared sometime after MacOS 11.0.1 and before or in 11.1.0. All we have been able to narrow down on the iOS side is ≥14.0.

If you have additional guidance on which versions of the OSes are affected, so that we can prevent Safari users from receiving broken images, it would be much appreciated!
Comment 7 Alexey Proskuryakov 2021-01-24 17:13:14 PST
*** Bug 220853 has been marked as a duplicate of this bug. ***
Comment 8 Perry 2021-01-26 15:45:29 PST
I have some more version numbers, although I'm uncertain if they give anything not already known.
Fails (i.e., image doesn't load): iOS 14.3, iOS 14.4, macOS 11.1
Works: iOS 14.0.1 

I'm uploading a second image which fails in the same scenarios as the page linked in the initial report.
Comment 9 Perry 2021-01-26 15:46:45 PST
Created attachment 418482 [details]
A second bad WebP image

Downloaded from <https://commons.wikimedia.org/wiki/File:Chessboard480.svg> via cURL:

    curl 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Chessboard480.svg/416px-Chessboard480.svg.png' -H 'Accept: image/webp' --output 'WebP loading error.webp'

Replacing "416" with "200" gives a WebP file that /does/ work. I haven't tested much further beyond that.
Comment 10 Eric Portis 2021-01-27 10:42:34 PST
Re: Perry in Comment #9

When I replace "416" with "200" I actually get a PNG back instead of a WebP? Not sure what decision making is happening on the server...

---

I compiled all of the example images here, plus a couple that we've received from Cloudinary customers:

https://ericportis.com/etc/broken-webps/

The one pattern that jumps out to me is that most of the broken images seem to have palletized color information in some channel; sometimes in the alpha channel (e.g., "lamp"), other times in color channels (e.g., "stripes", "chessboard").

Two possible exceptions are "blue" and "text". Looking at the image content I would kind of expect indexing (they both have very limited color palletes), but their webpinfos don't mention indexing as a transform, as every other image does...

If anyone from Apple could confirm our understanding of which versions of MacOS and iOS are affected, or share any information that could give us a sense of either the scale or cause of the problem, it would be *very* helpful.
Comment 11 Perry 2021-01-27 11:01:22 PST
(In reply to Eric Portis from comment #10)
> Re: Perry in Comment #9
> 
> When I replace "416" with "200" I actually get a PNG back instead of a WebP?
> Not sure what decision making is happening on the server...
If the Accept header is set to image/webp it serves it as a webp for me—going to the URL in a browser seems to serve it as a PNG. (See the curl command in comment 8.)

I'm not super confident that there'll be too much follow-up on the bug itself, especially as this isn't even a WebKit issue, but an internal one. I'm happy to be proved wrong though ;).
Comment 12 Eric Portis 2021-01-27 11:49:19 PST
Re: Perry in Comment #10

% curl 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Chessboard480.svg/200px-Chessboard480.svg.png' -H 'Accept: image/webp' --output 'isthisa.webp'; webpinfo isthisa.webp; exiftool isthisa.webp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   668  100   668    0     0   3976      0 --:--:-- --:--:-- --:--:--  3952
File: isthisa.webp
Errors detected.
ExifTool Version Number         : 12.00
File Name                       : isthisa.webp
Directory                       : .
File Size                       : 668 bytes
File Modification Date/Time     : 2021:01:27 11:47:56-08:00
File Access Date/Time           : 2021:01:27 11:47:56-08:00
File Inode Change Date/Time     : 2021:01:27 11:47:56-08:00
File Permissions                : rw-r--r--
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 200
Image Height                    : 200
Bit Depth                       : 8
Color Type                      : RGB
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Background Color                : 255 255 255
Image Size                      : 200x200
Megapixels                      : 0.040
Comment 13 Eric Portis 2021-02-01 17:16:11 PST
Tried my luck at creating WebPs that fail today... had some luck but am more confused now than ever.

https://ericportis.com/etc/tiny-webps/
Comment 14 Erik Bročko 2021-02-26 15:57:58 PST
Created attachment 421723 [details]
Solid black color

This is what cwebp spits out for a PNG with purely black color.
Comment 15 Erik Bročko 2021-02-26 16:00:25 PST
Created attachment 421724 [details]
Solid hex 121212 color

And this is even smaller image filled only with RGB hex 121212 color.
Comment 16 braids 2021-05-21 09:53:16 PDT
fwiw to anyone looking into this issue: an OS upgrade to 14.5.1 appears to have resolved this bug for me.
Comment 17 Bob Singor 2022-03-09 09:53:50 PST
Created attachment 454255 [details]
Example of a webp image that is not working on Safari
Comment 18 Eric Portis 2022-11-22 16:18:29 PST
This issue appears to have been fully fixed in macOS 13 Ventura.

However, today I discovered a seemingly-related issue, affecting JPEG2000s.

https://bugs.webkit.org/show_bug.cgi?id=248249
FB11815925