Open jsnkuhn opened 3 years ago
image-set
is finally going to be cross browser in version 113 of Chrome. Will probably be a bit until OBS version lines up with this. Current chrome version in OBS is 103 so an update is likely sometime soon (they tend to happen every 10 versions or so. maybe with v. 30 of obs?). So more waiting on this. Will be much cleaner and easier to maintain.
This is in some pages already. We probably need a check list.
.star-background{
background-color: #150a1e;
background-image: url(../rm2/images/stars-background-moz.jpg);
background-image: image-set(
"../rm2/images/stars-background.webp" type("image/webp"),
"../rm2/images/stars-background-moz.jpg" type("image/jpeg")
);
}
With ~95% browser support for current gen WEBP (https://caniuse.com/webp) we might be able to default to it and possibly get rid of most PNGs and JPEGs altogether (still a case by case thing).
Continue Testing for next gen formats:
comparing AVIF, WEBP, and image-set() support:
Looks like any browser that supports image-set() unprefixed also supports WEBP. So no need to test for WEBP i guess? Same deal with most browsers and AVIF (Edge is the only outlier). Seems like image-set() isn't as useful for this generation of file types as i would have been if it got added a few years ago....
appears that OBS has run into an issues with updating browser source versions. Doesn't seem likely to happen at and point in the near future: https://github.com/obsproject/obs-studio/discussions/3853#discussioncomment-7581473
The current system for file type support for background images isn't very good (messy and hard to maintain). Once Chrome supports
image-set()
it would probably be worth implementing it on most layouts. This would allow the removal of theimgsupport.js
current layout background image css for an FFR layout: