3 ms·
That negates the purpose of a bandwidth-efficient lossy image format.
by antimatter15 16y ago
That negates the purpose of a bandwidth-efficient lossy image format.
- user24 16y agoeven my original idea would require a double-hit to the server, because I don't think you can extract data loaded into an image element through JS, so you'd have to read the src attribute and re-request it via XHR as raw data, and then parse that into a replacement canvas element. The main benefit is being able to default to webp, and save all your resources in that format alone, and provide a fallback for browsers which don't support it, instead of having to provide 2 sets of images and serve different ones depending on the browser.