Decode images asynchronously
nhunzaker opened this issue · 1 comments
nhunzaker commented
Looks like you can load/decode images off the main-thread with:
fetch(imageSrc)
.then(response => response.blob())
.then(blob => createImageBitmap(blob))
.then(image => ...)
source: https://twitter.com/_developit/status/865682943494168576
I wonder if there's an advantage to using this on the gallery.
nhunzaker commented
Did some testing. This isn't faster and adds complexity to loading states.