2 ms·
We automatically convert user generated images to WebP if feasible and then use the <picture> element to display alternatives (the original format as the fallba
by dgb23 5y ago
We automatically convert user generated images to WebP if feasible and then use the <picture> element to display alternatives (the original format as the fallback). I'm pretty sure that this might be a common pattern.
Browsers could allow a selection of all sources provided by the picture element (this would also include differently scaled variants based on media queries) in a download dialog.
- Zardoz84 5y agoIt's not a option doing that if you need to serve a TiB of images and you need, yet, to support IE 11. JPEG XL on fly conversion to JPEG, offers a nice solution for this use case.
- dgb23 5y agoWe support IE11 with a polyfill. The images are converted and stored when they are uploaded or changed. I can see this being an issue with that kind of volume though. But it’s a performance gain for the clients while content doesn’t need to worry about it.