3 ms·
Ask HN: Do you use WebP without a fallback yet?
Is browser support good enough? We have important images that are shown using background-image for responsiveness, which means we can’t really do a fallback mechanism
- moxylush 5y agoI think it depends on your intended audience. I've use it without a fallback and without consequence because my visitors almost always use evergreen browsers.
- 1123581321 5y agoWe use it without fallback where development budget is low and the audience is mostly up to date and/or predominantly mobile. For everything else, it’s easy to either generate webp alternates to jpeg/png and use a picture element (for non-responsive srcset, only three inner elements are required for this), or to use Cloudflare or an image CDN that automatically serves webp. Usually a project that requires a framework or SaaS that can’t easily support one can use the other.
- brundolf 5y agoHadn’t thought about doing it at the CDN level; guess that would work for backgrounds too, huh
- forgotmypw17 5y agoHeck no, I support ANY BROWSER going back to Netscape 2.0+ and IE3+ ))) Not joking, either.
- favourable 5y agoWell there's a polyfill if you need it: https://github.com/chase-moskal/webp-hero https://github.com/chase-moskal/webp-hero As others have said: if the bulk of your traffic is people using the latest hardware, then polyfills are probably overkill. If you need to cater for more niche target audience using legacy hardware, then by all means, use polyfills.