If you haven’t used it before, image-set() is used in CSS in any place where you’d normally use an image. Here’s a simple example where the browser will use JPEG XL if it supports it, or JPEG if it doesn’t:
background-image: image-set(
url("bg.jxl") type("image/jxl"),
url("bg.jpg") type("image/jpeg")
);
( you can also specify resolutions, e.g. url() 2x type() )