I've noticed that many of the addons allow for placing images as background images. I'm very interested in using AVIF files for these backgrounds due to their superior compression and HDR support.
My main concern is ensuring broad browser compatibility. While AVIF support is growing, I'd like to implement a fallback for browsers that don't yet support the AVIF format. I was thinking of a CSS approach, similar to the following, within the addons Custom CSS panel:
.avif-bg { background-image: url('/path/to/your/fallback-image.jpg'); /* Fallback for unsupported browsers */ background-image: url('/path/to/your/preferred-image.avif'), url('/path/to/your/fallback-image.jpg'); /* AVIF with fallback */ }
Is this the recommended way to implement AVIF background images with a fallback in SP Page Builder, especially given how addons handle image placement?
If so, how can I reliably apply a custom CSS class like .avif-bg to the background image elements within various SP Page Builder addons? Are there specific settings or methods to target these elements for CSS?
Are there any known issues or alternative, more robust methods within SP Page Builder to achieve this kind of progressive enhancement for background images?
Any guidance on the best practice for integrating AVIF with a fallback for background images in SP Page Builder would be greatly appreciated.
Thank you!"