Bug 241904

Summary: [Cocoa] Support AVIF images for macOS Ventura and iOS 16
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: mmaxfield, njar09, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=244103
Bug Depends on: 244324    
Bug Blocks:    
Attachments:
Description Flags
red-square-avif none

Description Said Abou-Hallawa 2022-06-22 22:40:40 PDT
The system frameworks will be used to render the AVIF images on macOS Ventura and iOS 16.
Comment 1 Said Abou-Hallawa 2022-06-22 22:41:05 PDT
rdar://95742091
Comment 2 Said Abou-Hallawa 2022-06-22 23:23:23 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1717
Comment 3 EWS 2022-06-25 01:32:07 PDT
Committed 251850@main (59d774a32243): <https://commits.webkit.org/251850@main>

Reviewed commits have been landed. Closing PR #1717 and removing active labels.
Comment 4 Kaifeng Jin 2022-08-08 20:01:38 PDT
I find some avif image in base64 format still can't be render in Safari 16.Here is the image src link https://github.com/kamalendugarai/webp-avif-browsers-support-detection/blob/master/src/index.js#L11
Browser version 18614.1.19.1.5
This happened in both Mac OS 13 and iOS 16.
Comment 5 Said Abou-Hallawa 2022-08-18 14:19:55 PDT
Created attachment 461723 [details]
red-square-avif

I extracted the data URL from the linked JS file. I decoded the base64 into a binary file (attached). When opening it in Preview, a red rectangle is displayed but the Inspector tool shows that it is a HEIF image. And we do not support HEIF images in WebKit.

There might be a bug in the image frameworks such that they erroneously return public.heif for this image instead of returning public.avif.
Comment 6 Myles C. Maxfield 2022-08-18 14:26:35 PDT
Let's migrate this to https://bugs.webkit.org/show_bug.cgi?id=244103.