Bug 225185 - [Image-Set]: Support Resolution and Type as optional arguments
Summary: [Image-Set]: Support Resolution and Type as optional arguments
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryan Reno
URL: https://wpt.fyi/results/css/css-image...
Keywords: BrowserCompat, InRadar, WPTImpact
: 251197 (view as bug list)
Depends on:
Reported: 2021-04-29 02:13 PDT by Oliver Williams
Modified: 2023-02-27 08:14 PST (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Williams 2021-04-29 02:13:55 PDT
Safari seems to not currently support the type option, which allows new image formats like webp to be used while specifying a fall-back image in a more well supported format like jpeg or png. 

background-image: image-set( "foo.avif" type("image/avif"), "foo.jpg" type("image/jpeg") );

The relevant part of spec is here: https://drafts.csswg.org/css-images-4/#image-set-notation
Comment 1 Radar WebKit Bug Importer 2021-05-06 02:14:13 PDT
Comment 2 Karl Dubost 2023-01-25 23:34:17 PST
This is failing a couple of tests in 

and has impact on Interop 2023.
Comment 4 Ryan Reno 2023-02-23 15:20:27 PST
Resolution is also an optional parameter. As of right now we require resolution like the -webkit-image-set function did.
Comment 5 Ryan Reno 2023-02-23 15:21:15 PST
*** Bug 251197 has been marked as a duplicate of this bug. ***
Comment 6 Ryan Reno 2023-02-23 15:38:32 PST
Pull request: https://github.com/WebKit/WebKit/pull/10623
Comment 7 EWS 2023-02-24 09:20:48 PST
Committed 260796@main (e3554c53fff0): <https://commits.webkit.org/260796@main>

Reviewed commits have been landed. Closing PR #10623 and removing active labels.