Web technologies that should exist
-
@benschwarz Sure, but in document fragments, it should be fine
-
Thomas Steiner :chrome:replied to Alex Russell last edited by
@slightlyoff @benschwarz The brilliant `document.implementation.createHTMLDocument()` trick, 21:26 in https://youtu.be/LLRig4s1_yA. One of my favorite @jaffathecake shared wisdoms.
-
@slightlyoff AVIF should be able to embed a preview image. Much higher quality than a blurhash, but still few bytes https://avif-blur-preview.glitch.me/
-
@jaffathecake @slightlyoff a blurhash (or thumbhash https://evanw.github.io/thumbhash/) could be conceivably inlined for cases with large numbers of images though?
An avif thumb at around 16px still bottoms out at around ~300b vs ~26b for blurhash. A page with a hundred images could be rendered with a blurhash inline without any noticable page weight impact (~40kb for inlined base64 avif vs ~3.4kb)?
Avif is certainly the right choice for larger and less numerous previews though, it's impressively good!
-
@bendelarre @jaffathecake Would happily have both for option value.
-
@jaffathecake @slightlyoff although this AvifHash looks like a super great alternative hack:
Given this wouldn't involve that much for the platform to adopt properly in that it's still using the avif compression blocks just not the unnecessary blocks that seems like a fine alternative!
-
@bendelarre @slightlyoff these blurred things where you can't tell much about the image at all… I don't think they're of much value
-
@jaffathecake @slightlyoff definitely a debatable point to discuss with designers!
-
@bendelarre @jaffathecake ...and from a platform perspective, it doesn't matter. We have to make cheap what's common. That's literally how we compete.
-
@slightlyoff is your streaming idea basically this: https://github.com/whatwg/html/issues/2142
-
@Olliew Yes